allow_port.bat 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. @echo off
  2. ::netsh advfirewall firewall add rule name="exename" dir=in action=allow program="程序路径" enable=yes
  3. ::netsh advfirewall firewall add rule name="yuanchengu" dir=in protocol=udp localport=3390-3391 action=allow
  4. netsh advfirewall firewall delete rule name="HJ远程TCP" dir=in
  5. netsh advfirewall firewall add rule name="HJ远程TCP" dir=in protocol=tcp localport=3390-3391 action=allow
  6. netsh advfirewall firewall delete rule name="HJ远程UCP" dir=in
  7. netsh advfirewall firewall add rule name="HJ远程UCP" dir=in protocol=udp localport=3390-3391 action=allow
  8. netsh advfirewall firewall delete rule name="HJWebSocket" dir=in
  9. netsh advfirewall firewall add rule name="HJWebSocket" dir=in protocol=tcp localport=9000 action=allow
  10. netsh advfirewall firewall delete rule name="HJTimerServer" dir=in
  11. netsh advfirewall firewall add rule name="HJTimerServer" dir=in protocol=udp localport=20002 action=allow
  12. netsh advfirewall firewall delete rule name="HJTimerClient" dir=in
  13. netsh advfirewall firewall add rule name="HJTimerClient" dir=in protocol=udp localport=20003 action=allow
  14. netsh advfirewall firewall delete rule name="HJSoftDogTCP" dir=in
  15. netsh advfirewall firewall add rule name="HJSoftDogTCP" dir=in protocol=tcp localport=20004 action=allow
  16. netsh advfirewall firewall delete rule name="HJSoftDogUDP" dir=in
  17. netsh advfirewall firewall add rule name="HJSoftDogUDP" dir=in protocol=udp localport=20004 action=allow
  18. netsh advfirewall firewall delete rule name="HJVATCP" dir=in
  19. netsh advfirewall firewall add rule name="HJVATCP" dir=in protocol=tcp localport=20011-20050 action=allow
  20. netsh advfirewall firewall delete rule name="HJVAUDP" dir=in
  21. netsh advfirewall firewall add rule name="HJVAUDP" dir=in protocol=udp localport=20011-20050 action=allow
  22. netsh advfirewall firewall delete rule name="HJDATA" dir=in
  23. netsh advfirewall firewall add rule name="HJDATA" dir=in protocol=tcp localport=21001 action=allow
  24. netsh advfirewall firewall delete rule name="HJCLIENT" dir=in
  25. netsh advfirewall firewall add rule name="HJCLIENT" dir=in protocol=tcp localport=21003 action=allow
  26. netsh advfirewall firewall delete rule name="HJWeb" dir=in
  27. netsh advfirewall firewall add rule name="HJWeb" dir=in protocol=tcp localport=21006 action=allow
  28. netsh advfirewall firewall delete rule name="HJFTP" dir=in
  29. netsh advfirewall firewall add rule name="HJFTP" dir=in protocol=tcp localport=21010 action=allow
  30. netsh advfirewall firewall delete rule name="HJSPFXWEB" dir=in
  31. netsh advfirewall firewall add rule name="HJSPFXWEB" dir=in protocol=tcp localport=21080 action=allow
  32. netsh advfirewall firewall delete rule name="HJHIK" dir=in
  33. netsh advfirewall firewall add rule name="HJHIK" dir=in protocol=udp localport=21025 action=allow
  34. netsh advfirewall firewall delete rule name="HJFTPClient" dir=in
  35. netsh advfirewall firewall add rule name="HJFTPClient" dir=in protocol=tcp localport=21040-21050 action=allow
  36. netsh advfirewall firewall delete rule name="HJDXCTRL" dir=in
  37. netsh advfirewall firewall add rule name="HJDXCTRL" dir=in protocol=tcp localport=53401 action=allow
  38. netsh advfirewall firewall delete rule name="HJDXSTREAM" dir=in
  39. netsh advfirewall firewall add rule name="HJDXSTREAM" dir=in protocol=tcp localport=53403 action=allow
  40. ::pause