One, CentOS7 default firewall is firewall
1, close firewall firewall: sudo systemctl stop firewalld.service2, shutdown firewall boot: sudo systemctl disable Firewalld.service
Systemctl start Firewalld # boot,
systemctl enable FIREWALLD # boot up
systemctl stop Firewalld # Close
systemctl Disable Firewalld # Cancel boot
firewall-cmd--state systemctl
unmask firewalld
Execute The failed to start Firewalld.service:Unit is masked appears after the Systemctl start FIREWALLD command. What does this hint mean, is there a
Linux God to help explain the
FIREWALLD service is locked, execute command
systemctl unmask firewalld can unlock the service,
Perform Systemctl mask the next time you need to lock the service FIREWALLD
Second, if you want to use iptables words, then:
3. Install iptables Firewall
Perform the following command to install the Iptables firewall:
sudo yum install iptables
sudo yum install iptables-services4, configuring Iptables firewall, opening the specified port
5. Set iptables firewall boot:
Service iptables Restart #重启
Chkconfig iptables on or systemctl enable Iptables.service power-on self starter