Don’t know how to set up Firewall on Debian 12? We’ve got your back!
A Firewall is a tool that monitors and controls incoming and outgoing network traffic based on specific security rules. More specifically, Debian 12 uses tools like UFW to configure and manage firewall settings.
These tools allow users to define rules for allowing or blocking traffic and enhance the overall security of the system against unauthorized access and cyber threats.
How to Set up Firewall on Debian 12
To setup a Firewall on Debian 12, follow the below steps:
Update the Debian repository using:
sudo apt update
Install “ufw” using the below command:
sudo apt install ufw
After doing so, check the ufw version for the verification of Firewall installation:
sudo ufw version
Allow all SSH access to enable secure remote management of a server. It also makes it easier for administrators to perform tasks from anywhere:
sudo ufw allow ssh
To check which ports are open, execute:
ufw show added
Now, to see the firewall status, run:
sudo ufw status
In case, it is “inactive”, then activate it using the:
sudo ufw enable
In case, you want to uninstall the firewall, execute:
sudo apt remove ufw
Conclusion
In this guide, we demonstrated how to install and configure UFW on Debian. First, we updated the repository, then installed UFW, allowed SSH access for secure remote management, and checked open ports.
You can follow the given steps to effectively manage the network security of your server.