The firewall configuration of CentOS7 is very different from that of the previous version. after a lot of attempts, we finally find the key to solving the problem. The firewall of CentOS7 uses firewall by default, this is different from the previous version of iptables. Configure the firewall as follows: 1. disable the firewall: sudosystemctlstopfirewalld. service2. disable the boot startup: su
The firewall configuration of CentOS7 is very different from that of previous versions. after a lot of attempts, the key to solving the problem is finally found.
The firewall of CentOS7 uses firewall by default, which is different from the previous version using iptables. Configure the firewall as follows:
1. disable the firewall:sudo
systemctl stop firewalld.service
2. disable startup:sudo
systemctl disable firewalld.service
3. install iptables firewall
Run the following command to install iptables firewall:sudo
yum
install
iptables-services
?
4. configure the iptables firewall and open the specified port (similar to the previous version, there are many introductions on the Internet, but I will not discuss them here)
5. set iptables firewall to start upon startup:sudo
systemctl
enable
iptables
?
OK. You can access the service based on the configured port.