To list all tables rules : sudo iptables -L -v -n | more accept ssh on port 22 : sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT save config : iptables-save > iptables.conf restore config : iptables-restore iptables.conf save status service iptables save