# ufw `ufw` is an easy to use firewall. # Rules View rules with `ufw status numbered` You can allow TCP traffic from 10.0.0.1 to port 22 with: `ufw allow proto tcp from 10.0.0.1 to any port 22` # Manually edit rules In case you've broken some system and need to add/remove some rules, you can edit the rules under `/etc/ufw/`: `user.rules` and `user6.rules` for IPv4 and IPv6 respectively. # Wireguard As an example, suppose the wireguard network is `10.0.0.0/24`. You can configure ufw to allow SSH access as follows: * allow wireguard tunnel port: `ufw allow 51872/udp` * allow ssh access only from wireguard network: `ufw allow proto tcp from 10.0.0.0/24 to any port 22` * enable ufw: `ufw enable`