centos 7 防火牆改為iptables

CentOS 7.0的防火牆默認是firewall , 今天教大家設定iptables為防火牆~
先關閉firewall
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall開機啟動
firewallcmd state #查看默認防火牆狀態(關閉後顯示notrunning,開啟後顯示running)
安裝配置iptables防火牆
yum install iptables iptablesservice

設定iptables開機啟動

systemctl restart iptables.service #最後重啟防火牆使配置生效
systemctl enable iptables.service #設置防火牆開機啟動
「点点赞赏,手留余香」

    还没有人赞赏,快来当第一个赞赏的人吧!
0 条回复 A 作者 M 管理员
    所有的伟大,都源于一个勇敢的开始!
欢迎您,新朋友,感谢参与互动!欢迎您 {{author}},您在本站有{{commentsCount}}条评论