Centos7 Firewall Settings

Centos7 closes the firewall CentOS 7.0 uses

the firewall as the firewall by default, and iptables must be reset

. install iptables-services If you want to modify the firewall configuration, such as adding firewall port 3306 vi /etc/sysconfig/iptables add rules -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT after saving and exiting systemctl restart iptables.service #Restart the firewall to make the configuration take effect systemctl enable iptables.service #Set the firewall to start at boot and finally restart the system to make the settings take effect.























Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326526640&siteId=291194637