Disabling and enabling the firewall

The firewall is enabled by default. Disabling the firewall can be useful or even necessary in many cases, e.g. in a test environment. This step shows how to disable the firewall. Note that without a firewall, incoming and outgoing connections will no longer be checked. Never disable the firewall permanently.

Proceed as follows:

1. Stop the corresponding service.
sudo systemctl stop nftables
2. You must disable the service to prevent the firewall from starting automatically when the system is started.
sudo systemctl disable nftables
3. You can check the status of the service to make sure that nftables is stopped and disabled.
sudo systemctl status nftables
4. The status indicates that the service has stopped.
These steps disable the firewall, and firewall rules are no longer applied. If the firewall is to be re-enabled, the service must be restarted and re-enabled:
sudo systemctl start nftables
sudo systemctl enable nftables