Advertisement
fagervan

firewall.cmd

Mar 28th, 2019
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.80 KB | None | 0 0
  1. rem
  2. rem http://winintro.ru/netsh_technicalreference.en/html/1a736f2d-ecf8-4780-8e0f-85c4db75230b.htm
  3. rem
  4. netsh advfirewall reset
  5.  
  6. rem allow
  7. netsh advfirewall firewall add rule name="_ input TCP Port 80" dir=in action=allow protocol=TCP localport=80
  8. netsh advfirewall firewall add rule name="_ input icmp" dir=in action=allow protocol=icmpv4
  9. netsh advfirewall firewall add rule name="_ spotify"   dir=out action=allow program="C:\users\pepe\appdata\roaming\spotify\spotify.exe"
  10.  
  11. rem block
  12. rem netsh advfirewall firewall add rule name="_ block emby" dir=in action=block edge=yes  remoteip=any protocol=TCP localport=1900,8096,8920
  13.  
  14. rem allow
  15. netsh advfirewall firewall add rule name="_ allow emby 1.1.1.1" dir=in action=allow edge=yes remoteip=1.1.1.1 protocol=TCP localport=1900,8096,8920
  16.  
  17. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement