##connec to the server from this ip to mysql iptables -A INPUT -i eth0 -p tcp -d xx.xx.xx.xx --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT ##connect to the server from this ip /sbin/iptables -A INPUT -p tcp -s XXX.XXX.XXX.XXX -j ACCEPT