LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Firewall exeptions (https://www.linuxquestions.org/questions/linux-networking-3/firewall-exeptions-4175449587/)

mscolar 02-10-2013 05:41 PM

Firewall exeptions
 
Hi,

I am running CentOS 6.3 with the default firewall and I just can't enable port 3306 (mysql), I ve even switched off the firewall but it still won t work. I want mysql traffic to be enabled in incomming and outgoing traffic.

Firewall config:

:INPUT ACCEPT [0:0]

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 3306 -j ACCEPT


:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 3306 -j ACCEPT

-A INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT

Thank you.

acid_kewpie 02-11-2013 09:48 AM

if you've disabled iptables and it still doesn't work, something else is wrong, isn't it? Is mysqld even listening on port 3306? Note UDP is NOT applicable here, TCP only, and you shouldn't have outbound traffic on 3306 at all on the server, only inbound.

whizje 02-11-2013 09:53 AM

Enable remote access www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html

mscolar 02-11-2013 10:16 AM

Quote:

Originally Posted by acid_kewpie (Post 4889130)
if you've disabled iptables and it still doesn't work, something else is wrong, isn't it? Is mysqld even listening on port 3306? Note UDP is NOT applicable here, TCP only, and you shouldn't have outbound traffic on 3306 at all on the server, only inbound.

thank you for your reply, yes mysqld is listening on port 3306 and i only enabled UDP since I wasn't sure if mysql uses TCP or UDP.


All times are GMT -5. The time now is 08:01 AM.