firewall

Allow anonymous access to specific URL in Symfony firewall protected bundle

不想你离开。 提交于 2019-12-21 11:54:10
问题 I have a Symfony bundle which can only be accessible by using mydomain.com/box To access /box you must be logged in, however i would like to enable anonymous access into mydomain.com/box/download # Security.yml access_control: - { path: ^/box , roles: ROLE_USER} How can i do ? 回答1: # security.yml access_control: - { path: ^/box/download , roles: IS_AUTHENTICATED_ANONYMOUSLY} - { path: ^/box , roles: ROLE_USER} Symfony2 firewalls are processed in order, and only first matching one will be

Symfony 2 : Redirect a user to a page if he has a specific role

本小妞迷上赌 提交于 2019-12-21 06:02:03
问题 I have a little question. I want that wherever is the user on my website, if he have the role "ROLE_DEGRADE", he is redirected on a specific page. How I can do that, I have to use firewall ? I don't want to redirect the user to a form login, just to a simple page. I want that everywhere on my website, without put a "if role degrade..." everywhere, in all my controllers... Thanks for your help ;) 回答1: Something like this should do it ... Create a new listener : class AccessListener { private

Restricting MySQL 3306 port with IPTABLES

 ̄綄美尐妖づ 提交于 2019-12-21 04:28:17
问题 How to block mysql port 3306 for everybody, but allow it for a specific IP? This is what I currently do: iptables -I INPUT 1 -p tcp --dport 3306 -j ACCEPT 回答1: You need multiple rules to do that. In most cases, what will happen with a connection depends on the first rule, which it matches. So, first we accept our friends connection, second, we drop anybody other. Voila! iptables -I INPUT 1 -p tcp -s 1.2.3.4 --dport 3306 -j ACCEPT iptables -I INPUT 2 -p tcp --dport 3306 -j DROP 来源: https:/

How to open ports on Windows firewall through batch file

元气小坏坏 提交于 2019-12-20 11:59:08
问题 Is there any way within a batch file to open up specific ports on Windows through a batch file? It would be nice to have the installer do this for our server application rather than having the user manually do it. 回答1: Use netsh.exe. A very simple batch file that takes a port argument: @echo off rem -- open port (first argument passed to batch script) netsh advfirewall firewall add rule name="Open Port %1" dir=in action=allow protocol=TCP localport=%1 remoteip=10.15.97.0/24,10.17.0.0/16 回答2:

Trying to load files from github through a firewall is impossibly slow. Any suggestions for workarounds?

雨燕双飞 提交于 2019-12-20 09:15:16
问题 I'm a little hesitant to post this, as I'm not completely sure what I'm doing. Any help would be wonderful. I'm on a computer with a firewall/filter on it. I can download files without any difficulty. When I try to clone files from Github, though, the computer just hangs. Nothing happens. It creates a git file in the folder, but the key files don't get loaded in. For context, I'm working on a Rails app, trying to load in Restful Authentication. Have any of you dealt with this? Any suggestions

How to make a ssh connection to a firewall(router) with java?

那年仲夏 提交于 2019-12-20 05:39:12
问题 For some reason,I need to connect to a firewall(based on Linux) and add some rules with Java. After searching with google for a while, I found that jsch is my best choice.But when I use it to execute a command," show hostname " for example, error is returned.If I execute commands like "ls -l" and "whoami" ,the results are ok.That's to say,I can only connect to the Bash Shell! My question is how can I connect to the firewall shell? My test code as follows: import java.io.InputStream; import

Do you want the application to accept incoming network connection?

旧时模样 提交于 2019-12-19 23:29:57
问题 I have two C binaries which tries to open network connection for communication. This is for external communication. When i run that for the first time, OS X' firewall pops up the message as given in title. How can I get rid of this? I suspect this is related to code-signing? How to do code-sign this binary? Basically I have to build this binary in one Mac machine, and distribute outside app store. How can I get rid of the firewall pop up if the OS X firewall is enabled in the machine? 回答1:

Do you want the application to accept incoming network connection?

≯℡__Kan透↙ 提交于 2019-12-19 23:25:18
问题 I have two C binaries which tries to open network connection for communication. This is for external communication. When i run that for the first time, OS X' firewall pops up the message as given in title. How can I get rid of this? I suspect this is related to code-signing? How to do code-sign this binary? Basically I have to build this binary in one Mac machine, and distribute outside app store. How can I get rid of the firewall pop up if the OS X firewall is enabled in the machine? 回答1:

R parallel makeCluster() hangs infinitely on Mac

跟風遠走 提交于 2019-12-19 04:56:24
问题 I came across some problem when I was trying to use parallel package in R on my Mac. Here is how the parallel package works normally. cl = makeCluster(2) # Using 2-core parallel as an example # Your parallel code stopCluster(cl) When I ran this code, the cl = makeCluster(2) hangs infinitely . I was trying to solve it but failed. I also referred to some other posts. Several potential reasons includes not enough memory, installation error, etc. They do not seems to be the problem here, as I

WCF service blocked by Windows Firewall

白昼怎懂夜的黑 提交于 2019-12-18 21:17:56
问题 I've got a WCF service using a HttpBinding. The service is running in a self hosting process (A Windows Service) and this process is inside the Windows Firewall exceptions list. If the Firewall is active and I'm trying to access the service using a C# client or Internet Explorer, the service does not respond. But if the Firewall is disabled the connection works like a charm. Does anyone have expirence with WCF and the Windows Firewall? The problem came up on Windows 7 64bit. I didn't try