Home OS
Enable/disable
ufw enable
ufw disable
Check current status (including defaults)
ufw status verbose
Allow connections to port
ufw allow 22
Allow connections from ip address
ufw allow from 192.168.1.10
Allow connections from ip subnet
ufw allow from 192.168.1.0/24
Allow connections to port from ip address
ufw allow from 192.168.1.10 to any port 22
Allow TCP connections to port from ip address
ufw allow from 192.168.1.10 proto tcp to any port 22
Allow TCP connections to port and specific address from other ip address
ufw allow from 192.168.1.10 to 10.0.0.1 port 443 proto tcp
Delete rule
ufw status numbered
ufw delete X
Show existing rules when ufw is inactive
ufw show added