Page 1 of 1
NAT - MySQL Guest/Host Connectivity Issue
Posted: 7. Aug 2008, 18:12
by cReslyn
CentOS Host
NAT based WinXP 32 Guest
Latest VBox Release
Dilema:
Host has MySQL server but the guest refuses to talk to it's external IP to the cloud. I've connected remotely to the host without a problem from multiple origins, the guest just doesn't connect for whatever reason. I am aware that the guest isn't supported at the moment to talk directly to the host but I was under the impression that connecting out to the cloud then back in on the host would, or is that wrong?
Posted: 7. Aug 2008, 21:57
by TerryE
Some protocols (and FTP Active mode is a good example) the server process is a listener and the client give the server a "call-back" port number for what it perceives as its IP address. This type of protocol fails behind any type of NAS service that doesn't dynamically understand the protocol and dynamically remap the request. VBox doesn't do this. This is why are limited to the protocols that NAS can support and why you have to run PASV mode in FTPs. The simplest solution is to set up a bridged connection. Sorry.
My only other thought is that you could possible get ssh tunnelling to work. This isn't a solution, but more a gem of an idea from which you might get a working solution as in:
http://chxo.com/be2/20040511_5667.html
http://www.virtualbox.org/wiki/OpenVPN_on_VBox
Re: NAT - MySQL Guest/Host Connectivity Issue
Posted: 8. Aug 2008, 01:18
by greenpossum
cReslyn wrote:CentOS Host
NAT based WinXP 32 Guest
Latest VBox Release
Dilema:
Host has MySQL server but the guest refuses to talk to it's external IP to the cloud. I've connected remotely to the host without a problem from multiple origins, the guest just doesn't connect for whatever reason. I am aware that the guest isn't supported at the moment to talk directly to the host but I was under the impression that connecting out to the cloud then back in on the host would, or is that wrong?
How about giving some concrete IP numbers (make them up if you are concerned about posting them) to explain what you are doing? I have successfully connected to simple one-port no connection tracking needed services like ssh from a guest using both the external address of the host and also the NAT address of the host (10.0.2.2).
Re: NAT - MySQL Guest/Host Connectivity Issue
Posted: 8. Aug 2008, 06:45
by cReslyn
Problem is that I can't toss a router into this and set it up with a host interface since I'm renting only one slot at the colocation, which is why I went with the NAT'ing route.
The IP setup is essentially this:
Host OS: 64.14.4.4
Guest OS: 10.0.2.14
Guest OS: 10.0.2.15
Guest OS: 10.0.2.16
Guest OS: 10.0.2.17
All four guests need to tether their applications to the SQL server running on the host. I know VPN works, but I'm trying to remain free of that as much as possible.
Re: NAT - MySQL Guest/Host Connectivity Issue
Posted: 8. Aug 2008, 07:27
by greenpossum
Ok, so what happens if you do from a guest:
telnet 64.14.4.4 3306
telnet 10.0.2.2 3306
Do you get Connection refused, or nothing at all? What about ssh, does that work?
How is your firewall set up on the host? Are you allowing connections from 10.0.2.0/24? Because that where the packets will appear to come from when a guest connects.
Hopefully that will give you some places to look.
Posted: 8. Aug 2008, 07:52
by illa
I havent done a lot of vbox networking.. but would it make it easier if you added a second IP in the 10.* range to your host machine?
Posted: 8. Aug 2008, 07:58
by greenpossum
But it already does, it has a second interface with the address 10.0.2.2 by virtue of the NAT tunnel.
Posted: 8. Aug 2008, 08:05
by illa
yah i should learn to read better.. sorry maing
Posted: 8. Aug 2008, 13:15
by TerryE
Can I just remind you all of a bit of post etiquette. If you are just replying to the previous point, then hit post reply button. If you are replying to a previous post by XX, then hit post reply button and start your post with XX, ... If you want to pick out a specific point and respond to it then hit quote button and remove the bits that are not relevant to the text you want to quote. Quoting whole posts is just lazy and makes it hard for others to track the thread.
Re: NAT - MySQL Guest/Host Connectivity Issue
Posted: 8. Aug 2008, 16:57
by cReslyn
greenpossum wrote:Ok, so what happens if you do from a guest:
telnet 64.14.4.4 3306
telnet 10.0.2.2 3306
Do you get Connection refused, or nothing at all? What about ssh, does that work?
Nothing at all / no established connection.
greenpossum wrote:How is your firewall set up on the host?
Completely open when I trialed these, didn't come down to that issue.
Re: NAT - MySQL Guest/Host Connectivity Issue
Posted: 8. Aug 2008, 19:48
by greenpossum
cReslyn wrote:greenpossum wrote:Ok, so what happens if you do from a guest:
telnet 64.14.4.4 3306
telnet 10.0.2.2 3306
Do you get Connection refused, or nothing at all? What about ssh, does that work?
Nothing at all / no established connection.
MySQL has rules for IP addresses allowed to connect. Are those blocking connections?
Put a wireshark trace on packets coming in from 10.0.2.x and see if the packets are getting through.