*filter # Allows all loopback (lo0) traffic -A INPUT -i lo -j ACCEPT # Accepts all established inbound connections -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Allows all outbound traffic -A OUTPUT -j ACCEPT # Allows HTTP and HTTPS connections -A INPUT -p tcp --dport 80 -j ACCEPT -A INPUT -p tcp --dport 443 -j ACCEPT # Allows SSH connections # -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT # Reject all other inbound -A INPUT -j REJECT -A FORWARD -j REJECT COMMIT