windows防火墙
Windows防火墙工具
1.Firewall App Blocker
下载地址:https://www.sordum.org/8125/firewall-app-blocker-fab-v1-9/
- Peerblock
下载地址:http://baoku.360.cn/soft/show/appid/103858471
- Tinywall
windwos通过命令行配置防火墙规则
(1)恢复初始防火墙设置
netsh advfirewall reset
(2)关闭防火墙
netsh advfirewall set allprofiles state off
(3)启用桌面防火墙
netsh advfirewall set allprofiles state on
(4)设置默认输入和输出策略
netsh advfirewall set allprofiles firewallpolicy allowinbound,allowoutbound
以上是设置为允许,如果设置为拒绝使用blockinbound,blockoutbound
(5)关闭tcp协议的139端口
netsh advfirewall firewall add rule name=”deny tcp 139″ dir=in protocol=tcp localport=139 action=block
(6)关闭udp协议的139端口
netsh advfirewall firewall add rule name=”deny udp 139″ dir=in protocol=udp localport=139 action=block
(7)关闭tcp协议的445端口
netsh advfirewall firewall add rule name=”deny tcp 445″ dir=in protocol=tcp localport=445 action=block
(8)关闭udp协议的445端口
netsh advfirewall firewall add rule name=”deny udp 445″ dir=in protocol=udp localport=445 action=block
(9)使用相同的方法,依次关闭TCP协议的21、22、23、137、138、3389、5800、5900端口。
netsh advfirewall firewall add rule name= “deny tcp 21″ dir=in protocol=tcp localport=21 action=block
netsh advfirewall firewall add rule name= “deny tcp 22″ dir=in protocol=tcp localport=22 action=block
netsh advfirewall firewall add rule name= “deny tcp 23″ dir=in protocol=tcp localport=23 action=block
netsh advfirewall firewall add rule name= “deny tcp 3389″ dir=in protocol=tcp localport=3389 action=block 学习电脑
netsh advfirewall firewall add rule name= “deny tcp 5800″ dir=in protocol=tcp localport=5800 action=block
netsh advfirewall firewall add rule name= “deny tcp 5900″ dir=in protocol=tcp localport=5900 action=block
netsh advfirewall firewall add rule name= “deny tcp 137″ dir=in protocol=tcp localport=137 action=block
netsh advfirewall firewall add rule name= “deny tcp 138″ dir=in protocol=tcp localport=138 action=block
禁用某个IP
# 防火墙禁止
netsh advfirewall firewall add rule name="udp_18" dir=out action=block remoteip=192.16.12.18
netsh advfirewall firewall add rule name="udp_23" dir=out action=block remoteip=192.16.12.23
netsh advfirewall firewall add rule name="udp_10" dir=in action=block remoteip=192.16.11.10
# 删除规则
netsh advfirewall firewall delete rule name=udp_18
netsh advfirewall firewall delete rule name=udp_23
参考链接
【励志篇】:
古之成大事掌大学问者,不惟有超世之才,亦必有坚韧不拔之志。