iptablesで特定のホストからのMySQL接続を許可する

iptablesは難しいので調べた結果をメモしておく。

下記は、allow your hostからのMySQLの接続を許可する例。

iptables -A INPUT -m state --state NEW -p tcp -m tcp --dport 3306 -s 〈allow your host〉-j ACCEPT