LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 02-10-2013, 06:41 PM   #1
mscolar
LQ Newbie
 
Registered: Feb 2013
Distribution: CentOS
Posts: 9

Rep: Reputation: Disabled
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.

Last edited by mscolar; 02-10-2013 at 06:43 PM.
 
Old 02-11-2013, 10:48 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
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.
 
Old 02-11-2013, 10:53 AM   #3
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 583

Rep: Reputation: 129Reputation: 129
Enable remote access www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
 
Old 02-11-2013, 11:16 AM   #4
mscolar
LQ Newbie
 
Registered: Feb 2013
Distribution: CentOS
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
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.
 
  


Reply

Tags
firewall, mysql


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Managing A Single Firewall Policy For Multiple Servers Using Firewall Builder LXer Syndicated Linux News 0 12-06-2010 11:20 AM
pptp gets modem hung up outside firewall, but not inside firewall cmnorton Linux - Networking 4 11-27-2008 01:04 AM
router billion 5102 has firewall and software firewall tests aus9 Linux - Security 6 12-31-2006 11:09 PM
Firewall Builder sample firewall policy file ? (.xml) nuwanguy Linux - Networking 0 09-13-2003 01:32 PM


All times are GMT -5. The time now is 11:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration