I wanted to block all in/out connections to a remote IP using netsh
:
netsh advfirewall firewall add rule name="OUT RULE" dir=out interface=any action=block remoteip=<remoteIP>/32
netsh advfirewall firewall add rule name="IN RULE" dir=in interface=any action=block remoteip=<remoteIP>/32
But now the ping <remoteIP>
still works.
I want to achieve something similar to the following Linux commands:
iptables -A OUTPUT -d <remoteIP> -j DROP
iptables -A INPUT -d <remoteIP> -j DROP
How can block that IP in Windows?
-p icmp -j ACCEPT
before-s badip -j DROP
in your iptables.