Skip to content

Instantly share code, notes, and snippets.

@ifnull
Created February 13, 2015 19:11
Show Gist options
  • Save ifnull/e9af91d972e76bd570bd to your computer and use it in GitHub Desktop.
Save ifnull/e9af91d972e76bd570bd to your computer and use it in GitHub Desktop.
MySQL 3306 iptables rule
iptables -I INPUT -p tcp --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -I OUTPUT -p tcp --sport 3306 -m state --state ESTABLISHED -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment