• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

Windows (Windows Server 2008 R2) 防火墙配置


Recommended Posts

[title-plane title=”说明”]本文防火墙配置是基于 Windows Server 2008 R2 服务器进行叙述,其他Windows服务器版本仅供参考[/title-plane]

防火墙安全策略

定义:安全策略按照一定规则检查数据流是否可以通过防火墙的基本安全控制机制
规则的本质是:包过滤
防火墙安全策略的过程

https://z3.ax1x.com/2021/07/06/RIsgqe.png

作用:根据定乂的规则对经过防火墙的流量进行筛选,并根据关键字确定筛选岀的流量如何进行下一步操作

图形化配置防火墙

[c-alert type=”success”]做—个防火墙策略,要求指定IP才能访问到服务器,屏蔽其他无关IP用户访问[/c-alert]

1.进入服务器 –> 系统和安全 –> Windows防火墙

https://z3.ax1x.com/2021/07/06/RI6THg.png

2.选择 Windows防火墙 –> 打开或关闭windows防火墙,启用防火墙

https://z3.ax1x.com/2021/07/06/RIc38I.png

3.冼择 windows防火墙 –> 高级设置;选择入站规则 –> 新建规则

https://z3.ax1x.com/2021/07/06/RIg5Tg.png

4.选择“规则类型“,这里选择“端口”

https://z3.ax1x.com/2021/07/06/RIgx7F.png

5.选择“协议和端口

6.选择“操作”

https://z3.ax1x.com/2021/07/06/RI2NNQ.png

7.选择“配置文件”,在何时应用这个规则。并设置规则名称

https://z3.ax1x.com/2021/07/06/RI2cEF.png

8.选择入站规则 –> 规则名 –> 属性 –> 作用域 –> 添加需要添加的IP

https://z3.ax1x.com/2021/07/06/RI2OCd.png

命令行配置防火墙

[c-alert type=”success”]优点:
1.配置更快速,一旦熟练掌握了如何使用η etsh advfirewa‖l,就可以快速的配置防火墙
2.可以编写脚本,使用这个工具你可以对一些常用的功能编写脚本
3.图形化界面不可用时依然可以配置防火墙[/c-alert]

firewall命令:使用这个命令可以增加新的入站和岀站规则到防火墙中,也可以修改防火墙中的规则

https://z3.ax1x.com/2021/07/06/RIbpNt.png

Copy
 
示例: 增加本地的TCP的3389端口对外开放
 
? \Users\Administrator>netsh advfirewall firewall add rule name=icqtest dir=in action=allow protocol=tcp localport=3389
 

https://z3.ax1x.com/2021/07/06/RIbu40.png

查看防火墙中的入站规则,可以发现和手动添加的效果一样

https://z3.ax1x.com/2021/07/06/RIbTbj.png

Copy
 
示例:删除前面添加的规则
 
? \Users\Administrator> netsh advfirewall firewall delete rule name =icqtest protocol=tcp localport=3389
 

https://z3.ax1x.com/2021/07/06/RIqiI1.png

Link to comment
Share on other sites