Saturday, November 29, 2008

Setting up a Firewall for Ubuntu

Ubuntu 8.04 has ufw, a built-in tool that is way easier to use than iptables. Setup the default rule to deny everything we don't specifically accept
ufw default deny
Allow anything from local network
ufw allow 192.168.0.0/24
Allow access to specific ports, in this case ssh and http
ufw allow 22/tcp
ufw allow 80/tcp
Enable the firewall
ufw enable
Review the rules that were setup
ufw status

1 comment: