?
Solved

I can't access MYSQL on port 3306 from the internet on a linux box behind a router, What's missing?

Posted on 2006-04-21
6
Medium Priority
?
1,389 Views
Last Modified: 2008-01-09
I have a linux box running on 192.168.2.8 with my sql working on it on port 3306 in my LAN,
I setup the router to forwars incoming calls on port 3306 to 192.168.2.8.

I setup linux box with no FIREWALL to see if that fixed the problem but no luck. iptables -F .

I even tried with sftp using port 22 , port 80 web server and I get connection refused. What could be missing?

If I use the internal Network everything works great but not through the rourter port forwarding, which by the way works well because I have other ports on other server working perfectly.

Thanks



0
Comment
Question by:henry007
  • 3
  • 2
6 Comments
 
LVL 15

Expert Comment

by:m1tk4
ID: 16511890
On your box, try

telnet 192.168.2.8 3306

If you see something like this:

Escape character is '^]'.
j4
4.1.12&#9618;\p~K<)UR},>Z-plLy<_

This means mysql is running and bound to the correct IP address and you should troubleshoot your router. Depending on your router it may take a simple router reboot to flush router's ARP tables (hardware routers) or something like that from the command line (Linux routers). What kind of router do you use?
0
 

Author Comment

by:henry007
ID: 16512329
yes That's what I get, So I think there is a filter somewhere that only allows IPs starting with 192.1268.bla.bla.bla.  The Router is a belkin router. It's a piece of cake to configure, and as I said above it works on other OS's . What do you think ?
0
 
LVL 15

Expert Comment

by:m1tk4
ID: 16512641
If you get "connection refused" for :21 and :80 connects I would take a look at /etc/hosts.deny & /etc/hosts.allow. Interesting though.

Does your belin router have any admin testing tools (at least ping)?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 51

Accepted Solution

by:
ahoffmann earned 2000 total points
ID: 16512766
start
  tcpdump -l -n port 3306
on your linux box, then try to connect from internet, if you don't see anything then it's a router problem
0
 

Author Comment

by:henry007
ID: 16526434
I don't see anything. Nothing at al.  Mmmm the router is doing it job on other servers, I'll swap it just for the heck of it.
0
 

Author Comment

by:henry007
ID: 16536036
It's the router, I installed a linksys router and allow me to get through. I wonder why Belikin router won't budge, it works on windoze servers but not linux servers, Well I think I have to call the tech support in india and ask them why in the world is not forwarding to linux servers.

Thanks to all
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question