> mysql> show global variables like 'max_allowed_packet';
>
> +--------------------+----------+
>
| Variable_name | Value |
>
+--------------------+----------+
>
| max_allowed_packet | 16777216 |
>
+--------------------+----------+
>
1 row in set (0.00 sec)
/sbin/iptables -I INPUT -p tcp --dport 3306 -j DROP
root@test:~$ cat /etc/network/if-pre-up.d/iptables_load
#!/bin/sh
iptables-restore < /etc/iptables.rules
exit 0
root@test:~$ cat /etc/network/if-post-down.d/iptables_save
#!/bin/sh
iptables-save -c > /etc/iptables.rules
if [ -f /etc/iptables.downrules ]; then
iptables-restore < /etc/iptables.downrules
fi
exit 0
root@test:~$