Disable CentOS7 Firewall
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:SudoSystemctlstopfirewalld. service
2. Disable startup:SudoSystemctldisablefirewalld. service
3. Install iptables Firewall
Run the following command to install iptables Firewall:SudoYumInstallIptables-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:SudoSystemctlEnableIptables
?
OK. You can access the service based on the configured port.