The firewall configuration of CentOS7 is very different from the previous version. The firewall of this version of CentOS7 uses firewall by default.
Here is a reference address: https://www.cnblogs.com/sucretan2010/p/10835175.html
1. Turn off the firewall:
1 |
|
2. Turn on the firewall:
1 |
|
3. Turn off and start up:
1 |
|
4. Turn on startup:
1 2 3 4 5 6 7 8 9 10 |
List 1 firewall-cmd --list-all 或者 firewall-cmd --zone=public --list-ports
|