2
1
This is my setup (the relevant parts, anyway):
I have port forwarding rules in place (in the Linksys) for all the relevant ports and I've restarted that router multiple times, each time hoping that would be the magic that makes it work. I've tried removing the port forwarding rule and then re-adding it. Still no go.
From the laptop, I can access the NAS (QNAP) via ports :80 and :8080 as well as the counter strike server on the Windows 7 box. So I know those forwarding rules work (and, more importantly, that the client bridged dd-wrt isn't interfering with them).
I can access the MySQL server in the following ways:
- auth'd user via phpMyAdmin running on the NAS
- auth'd user via local client on Windows 7 machine
I cannot access the MySQL server from the laptop despite the fact that I have 3306 forwarded to 192.168.1.101 (and I've checked the configured port of the server multiple times; it's 3306). It appears to just time out while trying to connect via:
mysql -h 192.168.2.103 -u gnucash_admin
and I get a 2003 error when trying:
mysql -h 192.168.2.103
nmap -sT 192.168.2.103
doesn't return any results for 3306 at all.
Additional Info:
hosts on Laptop:
192.168.2.103 home.fakedomain.loc
hosts on Windows 7:
192.168.1.101 home.fakedomain.loc
Note: I do not have an actual domain or any name servers, LDAP, etc. All done via hosts files. When trying the above, I've tried by both IP and by name.
Update
From the laptop, I am not able to connect via:
telnet 192.168.2.103 3306
I am able to log in to the mysql db from the laptop via ssh port forwarding (tunneling to a different machine also on the 192.168.1.x subnet).
Update
So, I connected a hub between the NAS and the router and also connected my Raspberry Pi to the hub (because everything is cooler when done on a RPi). I then ssh'd into the RPi to run:
tcpdump -nS dst port 3306
I can see other traffic headed to the db, but when I run (from the laptop):
mysql -h 192.168.2.103 -u gnucash_admin -p
I see nothing on the RPi. So I re-ran my nmap scan (nmap -sT -p3306 192.168.2.103
) this time with tcpdump running and, again, I see nothing on the RPi.
So, it seems the question has become: why is port 3306 getting filtered (with forwarding rules in place) while other traffic is correctly forwarded?
Another oddity I noticed is that the other db traffic that I saw in tcpdump (dest port 3306) had a source port of 51883. I'm not a TCP guy, so that seemed strange to me. Does the source port have any bearing on this problem?
Does anyone see what I'm missing?
MySQL usually have a security of not allowing certain usernames login from random IP address. Check on your MySQL setting to allow gnucash_admin to allow your laptop IP to access it remotely? – Darius – 2014-02-09T01:44:15.703
If that were the issue, wouldn't that have prevented access from the Windows 7 box (which I stated was successful)? – Allen – 2014-02-09T01:47:32.950
It should, unless you already have a current rule to allow win7 IP (192.168.1.101) to access it remotely. Or maybe you only allow local subnet on MySQL? (and since your laptop is on 192.168.2.x) – Darius – 2014-02-09T01:51:31.843
The "error 2003" from MySQL also gives a numeric code in parentheses, which provides a platform specific reason for the failed connection. What code do you get when you try to connect? – Michael - sqlbot – 2014-02-09T13:24:32.623
I've seen both 110 and 111, and now I'm trying to remember from where and how I was running when I got each... – Allen – 2014-02-09T14:48:00.667