UFW : cheat sheet

From kraba notes
Jump to: navigation, search


Just a simple cheat sheet, the man is better :)

ufw default deny incoming
ufw default allow outgoing

ufw allow ssh
ufw allow 123/tcp
ufw allow from 10.0.0.3 proto tcp to any port 33061

Drop all connections from
ufw deny from 10.0.0.3 to any
ufw status verbose
ufw status numbered

ufw delete #number

Logging only in /var/log/ufw.log:

vi /etc/rsyslog.d/20-ufw.conf

:msg,contains,"[UFW " /var/log/ufw.log
& stop


blog comments powered by Disqus