Setting up Uncomplicated Firewall (UFW)
1. Install it using your package manager.
sudo apt install ufw
2. Now use these recommended rules:
sudo ufw limit 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw enable
3. If you are using the application LocalSend, also run this:
sudo ufw allow 53317
This will allow localsend to work properly with the ufw rules above.
4. If you are using KDEConnect:
sudo ufw allow 1714:1764/tcp
sudo ufw allow 1714:1764/udp
5. If you want a GUI for the UFW, install the following:
sudo pacman -S gufw
6. Done.
Quick Note
I highly recommend you check out the Debian Post Install guide first If you haven’t yet.