Setting up Uncomplicated Firewall (UFW)

  1. You can install it using your package manager.

    sudo pacman -S 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.

  1. If you are using KDEConnect:

    sudo ufw allow 1714:1764/tcp
    sudo ufw allow 1714:1764/udp
    
  2. If you want a GUI for the UFW, install the following:

    sudo pacman -S gufw
    
  3. Done.

Quick Note

I highly recommend you check out the Arch Post Install guide first If you haven’t yet.