List of Important Firewall Commands For Linux User
Today we’re going to show you a list of important firewall commands in the Linux machine. We have installed RedHat 7.5 version installed on our system.
To check the state of the firewall. you can use a firewall to control your traffic and access to the server with on particular port. you can do this with iptables also in Linux 7 version.
Check Out: How To Add Ports in firewall On CentOS 7
Check default zone of firewall
Check active zone of the firewall
Check rules are associated with a firewall so
Check all zone available
firewall-cmd –get-zones so
Add service so
firewall-cmd –zone=public –add-service=http
Check services in a specific zone so
firewall-cmd –zone=public –list-services
The command to open the ports so
firewall-cmd –zone=public –add-port=4000/tcp
Note: You can use –permanent parameter to added it permanent.
Check particular port added in zone
firewall-cmd –zone=public –list-ports