Setting up Uncomplicated FireWall (UFW)

Primarily used on Ubuntu and Debian:

apt-get install ufw
ufw enable
ufw default deny incoming
ufw default allow outgoing
# checkit:
ufw status verbose
# add ssh
ufw allow ssh
# add other rules by servicename or custom, e.g. for Redis:
# ufw allow in on eth1 to any port 6379 proto tcp

see more here

Leave a Reply