echo@
netsh advfirewall firewall add rule name="test" dir=in action=block protocol=TCP remoteip=16.24.0.0/24,**from 157.175.0.0 to 157.175.255.255**,**from 15.184.0.0 to 15.184.255.255**,**from 15.185.0.0 to 15.185.255.255**
netsh advfirewall firewall add rule name="test" dir=out action=block protocol=TCP remoteip=16.24.0.0/24,**from 157.175.0.0 to 157.175.255.255**,**from 15.184.0.0 to 15.184.255.255**,**from 15.185.0.0 to 15.185.255.255**
start wf.msc
pause
I'm trying create a Windows batch file which can block IP addresses in my firewall.
It's working when I use one IP, but I need to block ranges, not only one. For example the range 15.185.0.0
to 15.185.255.255
.
this is the answer to my question