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