第十一题:配置防火墙

Q1:在system1和system2上设置防火墙,对ssh实现防火墙,对ssh实现访问限制:

&允许group10.example.com域的客户对system1和system2进行ssh访问。

&禁止my133.org域的客户对system1和system2进行ssh访问。

&my133t.org是在172.13.10.0/24网络

在命令行界面下,分别在system1和system2上添加富规则(别忘了是在两台虚拟机上都要执行的)

firewall-cmd --add-rich-rule="rule family=ipv4 source address=172.24.10.0/24 service name=ssh accept" --permanent

firewall-cmd --add-rich-rule="rule family=ipv4 source address=172.13.10.0/24 service name=ssh reject" --permanent

firewall-cmd --reload

firewall-cmd --list-all |grep ssh

在service上分别ssh和system1和system2,进行测试

posted on 2018-05-17 22:40  快乐的阳光  阅读(130)  评论(0)    收藏  举报