How to configure a firewall on Fedora.

Setting up a firewall on Fedora can be achieved using the Firewalld tool. The following are the steps to set up a firewall on Fedora:

  1. Check if Firewalld is installed: Enter the following command in the terminal to verify if Firewalld is installed:
sudo systemctl status firewalld
  1. If Firewalld is not installed, you can use the following command to install it:
sudo dnf install firewalld
  1. Start the Firewalld service and enable it to start automatically on boot.
sudo systemctl start firewalld
sudo systemctl enable firewalld
  1. Check the status of Firewalld to make sure it is running.
sudo firewall-cmd --state
  1. Set up Firewalld rules: You can use the firewall-cmd command to add, delete, and manage firewall rules. For example, you can use the following command to allow SSH traffic:
sudo firewall-cmd --zone=public --add-service=ssh --permanent
  1. Reload the Firewalld configuration to apply the changes.
sudo firewall-cmd --reload
  1. View the list of Firewalld rules:
sudo firewall-cmd --list-all

By following the steps above, you can successfully set up a firewall on Fedora and configure rules to protect your system.

Leave a Reply 0

Your email address will not be published. Required fields are marked *