Disabling the firewalld Service

In Oracle Linux 8, nftables isn't enabled by default because the firewalld service uses it as its backend. Disable firewalld before beginning to work with nftables.

Do the following:
  1. Disable the firewalld service if it isn't already disabled:

    sudo systemctl disable --now firewalld
  2. Clear any preexisting rulesets in nftables created by firewalld:
    sudo nft flush ruleset
  3. Display the current status of the firewalld service and ensure that the service is listed as inactive (dead):
    systemctl status firewalld
    firewalld.service
       Loaded: masked (Reason: Unit firewalld.service is masked.)
       Active: inactive (dead)
    
    Jan 20 15:16:07 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
    Jan 20 15:16:08 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
    Jan 20 15:16:08 localhost.localdomain firewalld[1635]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now.
    Jan 20 15:52:27 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon...
    Jan 20 15:52:27 localhost.localdomain systemd[1]: firewalld.service: Succeeded.
    Jan 20 15:52:27 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.