Controlling the firewalld Service
In Oracle Linux 8, the firewall service,
firewalld
, is enabled by default. The service is controlled by the
systemctl command.
To start the service:
sudo systemctl unmask firewalld
sudo systemctl start firewalld
To ensure that the service starts automatically when the system starts, run the following command after starting the firewall:
sudo systemctl enable firewalld
To stop the firewall service and prevent it from automatically starting when the system starts, run the following command:
sudo systemctl stop firewalld
sudo systemctl disable firewalld
To prevent the firewall service from being started by other
services or through the firewalld
D-Bus
interface, run the following command after disabling the
firewall:
sudo systemctl mask firewalld
To display the current status of the firewall service:
sudo systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2022-04-20 18:33:59 BST; 2 weeks 5 days ago Docs: man:firewalld(1) Main PID: 4261 (firewalld) Tasks: 3 (limit: 99538) Memory: 4.7M CGroup: /system.slice/firewalld.service └─4261 /usr/libexec/platform-python -s /usr/sbin/firewalld --nofork --nopid