articles:general:computing:linux:ufw

UFW firewall settings in Linux

Here are some quick tips on the UFW firewall

apt install ufw

enable or disable

ufw enable
ufw disable

allow ssh

ufw app list
ufw allow openSSH
ufw limit openSSH

block all outgoing traffic and allow all

ufw default deny outgoing
ufw default allow outgoing

allow access to only one ip in LAN

ufw allow out to 192.168.0.10
ufw allow in from 192.168.0.10

check settings

ufw status
ufw status verbose

check settings with numbered & delete the particular number

ufw status numbered
ufw delete 2

allow traffic in and out on certain port

ufw allow 5900

allow traffic from 192.168.0.1 to 255

ufw allow from 192.168.0.0/24
  • delete all rules
ufw reset

open ssh

  • Last modified: 2023/07/06 17:15