0
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=<ip> localport=<port1,port2> 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=<ip> localport=<port1,port2> dir=out enable=yes action=allow profile=Private
I also did this manually. Also after running the command I manually checked if the rules were created correctly – mhd – 2016-06-15T13:06:32.217