security - Restricting MySQL 3306 port with IPTABLES -


how block mysql port 3306 everybody, allow specific ip? do:

iptables -i input 1 -p tcp --dport 3306 -j accept 

you need multiple rules that. in cases, happen connection depends on first rule, matches. so, first accept our friends connection, second, drop other. voila!

iptables -i input 1 -p tcp -s 1.2.3.4 --dport 3306 -j accept iptables -i input 2 -p tcp --dport 3306 -j drop 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -