centos安裝防火墻 Centos7如何安裝iptables防火墻?
Centos7如何安裝iptables防火墻?System operating environment centos7CentOS Linux release 7.4.1708(core)關(guān)閉fire
Centos7如何安裝iptables防火墻?
System operating environment centos7
CentOS Linux release 7.4.1708(core)
關(guān)閉firewalld firewall
systemctl disable firewalld#disable booting
安裝iptables firewall并打開
systemctl enable iptables#booting
關(guān)閉SELinux
VIM/etc/SELinux/configselinux=disabled#change強(qiáng)制禁用setinforce 0#立即生效
可以使用RPM-QA | grep iptables查看,centos7默認(rèn)防火墻為firewalld,iptables不應(yīng)安裝,可以使用Yum install iptables-y安裝。
centos7為什么不用iptables?
主要是關(guān)于習(xí)慣,比如CentOS 7的SYSTEMd Firewalld,習(xí)慣了舊版本的CentOS,如果你突然改變CentOS 7會(huì)很不習(xí)慣,但僅此而已
如果你使用更多的SYSTEMd,你會(huì)發(fā)現(xiàn)管理起來比init還不方便。D、 而且systemd服務(wù)的編寫比init簡(jiǎn)單得多。D.至于firewalld,你可以完全卸載和安裝iptables
centos7更難適應(yīng)以上兩種只要你習(xí)慣了就可以了