Firewalld - Getting Started with the firewall-cmd command
by
Jeremy Canfield |
Updated: September 06 2021
| Firewalld articles
Use apt-get or yum to install firewalld.
~]# apt-get install firewalld
~]# yum install firewalld
The ps command can be used to determine if your system is using init or systemd. If PID 1 is init, then you will use the service command. If PID 1 is systemd, then you will use the systemctl command.
If your system is using systemd, use the systemctl command to start and enable firewalld.
systemctl enable firewalld
systemctl start firewalld
systemctl status firewalld
If your system is using init, use the chkconfig and service commands to start and enable firewalld.
chkconfig firewalld on
service firewalld start
service firewalld status
Now you can start configuring firewalld.
- Allow or deny a port
- Allow or deny a protocol
- Allow or deny a service
- Bind to an ethernet interface
- IP address masquerade
- Lockdown
- Port forwarding
- Zones
Did you find this article helpful?
If so, consider buying me a coffee over at