actual iptables code used: #SMTP output, only allow mail to send remotely. iptables -A OUTPUT -m owner --uid-owner mail -p tcp --dport 25 -j ACCEPT iptables -A OUTPUT -m owner --uid-owner root -p tcp --dport 25 -j ACCEPT iptables -A OUTPUT -p tcp -d 127.0.0.1 --dport 25 -j ACCEPT iptables -A OUTPUT -p tcp --dport 25 -j REJECT /sbin/service iptables save cat /etc/sysconfig/iptables Feel free to remove the whole line containing "--uid-owner root" if you don't need it. I personally do a lot of debugging with telnet to port 25, hence I'm leaving it open.