Wednesday, December 24, 2014

firewall - Correct way to block all outgoing traffic and allow only one application

I am trying to block all traffic on a machine, except the outbound connection for an application with some ip's and ports. This is how I'm doing it but it's still blocked:


First, I turn on firewall and block all outbound connections for domain, private and public profile. After that, I run the follwing netsh commands in order to allow only the application traffic:


netsh advfirewall firewall add rule name="Allow_TCP_connection" program="%ProgramFiles% (x86)\Application\Application.exe" protocol=tcp remoteip= localport= dir=out enable=yes action=allow profile=Private
netsh advfirewall firewall add rule name="Allow_UDP_connection" program="%ProgramFiles% (x86)\Application\Application.exe" protocol=udp remoteip= localport= dir=out enable=yes action=allow profile=Private

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...