Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Well, this isn't a security issue per se, but I am curious about a few things. I only run a webserver, so my iptables firewall drops everything not destined for port 80, however, when I run nmap it shows 3306 mysql as open.
I do use mysql, but it is on the same computer so I don't need the port open right?
Why does port 3306 ignore my firewall rules? Anyone know what's up?
You might want to post your iptables script to get a better answer. However, I'll hazard the guess that your script isn't blocking internal requests. In other words, if you used nmap to scan from a different computer, you might not see port 3306 open.
Of course without seeing your iptables rules, this is nothing more than a WAG.
# set a sane policy: everything not accepted > /dev/null
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
# allow local-only connections
iptables -A INPUT -i lo -j ACCEPT
# free output on any interface to any ip for any service (equal to -P ACCEPT)
iptables -A OUTPUT -j ACCEPT
# permit answers on already established connections
# and permit new connections related to established ones (eg active-ftp)
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# accepts http requests at port 80
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
Perhaps you could scan me to see...my domain is in my sig