Skip to content

Instantly share code, notes, and snippets.

@kaioken
Created June 14, 2018 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaioken/1698eecd21f06d9f9f48fc3a6db53845 to your computer and use it in GitHub Desktop.
Save kaioken/1698eecd21f06d9f9f48fc3a6db53845 to your computer and use it in GitHub Desktop.
Iptable open for a specific IP

##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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment