I had problems setting iptables on ubuntu so used a script to get it working and modified it for my specific ports I needed to be open. #!/bin/sh IPT=”/sbin/iptables” # Flush old rules, old custom tables $IPT –flush $IPT –delete-chain # Set default policies for all three default chains $IPT -P INPUT DROP $IPT -P ..