In CentOS 7 or RHEL 7 or Fedora, firewalls are managed by firewalld
add to
Firewall CMD — zone = public — add port = 80/TCP — permanent (– permanent effective, invalid after restart without this parameter)
Firewall CMD — zone = public — add port = 1000-2000/TCP — permanent
reload
Firewall CMD — reload
View
Firewall CMD — zone = public — Query port = 80/TCP
delete
Firewall CMD — zone = public — remove port = 80/TCP — permanent
turn on the firewall
Systemctl start firewalld. Service
turn off the firewall
Systemctl stop firewalld. Service
View running status
Firewall CMD — state// running means running
Similar Posts:
- [Solved] Centos7 Failed to start iptables.service: Unit not found
- Firewall is not running an error is reported when the remote server opens the port
- [Solved] CentOS 7.9 Install MySQL Error: 2003- cannot connect to mysql server on ‘10.10.1.202’(10060 “Unknown error”)
- [Solved] CentOS 7.2 Startup Error: Failed to start IPv4 firewall with iptables
- [Solved] Centos7 linux ailed to stop iptables.service: Unit iptables.service not loaded.
- Vsftp: 425 FTP connection failed [How to Solve]
- Solve the problem of SSH Connection closed by foreign host
- Zabbix-server Error: No route to host [How to Solve]
- Rabbitmq error of connecting the native idea to Linux: java.net.connectexception: connection timed out: Connect [Solved]
- [Solved] MySQL Connect Error: Can’t connect to MySQL server on ‘ ‘(61)