Host Only ports are closed, cannot access SQL Server from Ubuntu host

Discussions related to using VirtualBox on Linux hosts.
Post Reply
decal
Posts: 1
Joined: 6. Oct 2016, 00:00

Host Only ports are closed, cannot access SQL Server from Ubuntu host

Post by decal »

My host is Ubuntu 16.04 and I am running a Windows 8 guest machine that has a SQL Server Express instance running as a service. I need to access this database from my host.

I have set up two network adapters, a NAT and a host only connection with a static ip address of 192.168.1.39.

When I try to access my database using JDBC I get an error saying that the connection is refused. I have confirmed that the SQL Server service is running on my guest. I have also ran a netstat -an |find /i "listening" command on my windows machine which shows the MS SQL port open at 0.0.0.0:1433 which I have come to learn means that everything should have access to it (which is what i have specified in my firewall)
netstat.png
netstat.png (2.23 KiB) Viewed 2034 times
When I ping my guest from my host it works, however running nmap -p 1433 -sT 192.168.1.39 from my host says that the port is closed:
nmap.png
nmap.png (26.87 KiB) Viewed 2034 times
How do I get that port open? I could use some help as I am not very good with the whole networking thing and have spent a couple hours tyring to figure this out, all help would be appreciated. Thanks!
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Host Only ports are closed, cannot access SQL Server from Ubuntu host

Post by socratis »

decal wrote:When I ping my guest from my host it works
decal wrote:netstat -an |find /i "listening" command on my windows machine which shows the MS SQL port open at 0.0.0.0:1433
To me that looks like VirtualBox is doing its job. I would remove the NAT interface, just to simplify the scenario until it works. Why did you assign a static IP to your guest, so that you can find it easily?

Have you looked at it from an networking/SQL angle? I.e. forget about the whole VirtualBox thing and look at it as if you had two physical computers.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply