Problem connecting to MS SQL server via VPN

We have a VPN that we connect to via Remote Desktop (address format xxx.xxx.xxx.xxx:xxxx).  When connected to the remote server we uses ms sql 2008 r2.  We wanted to know if we can use our local ms sql 2014 to connect to another sql instance via that same vpn.  What we have doen the following in our ms sql 2014:

Just the address,           xxx.xxx.xxx.xxx
Address\InstanceName,       xxx.xxx.xxx.xxx:xxxx\InstanceName
Address\(local),            xxx.xxx.xxx.xxx:xxxx\(local)
Address-port,               xxx.xxx.xxx.xxx:xxxx   - (THIS IS HOW WE CONNECT TO VPN)
Address-port\InstanceName,  xxx.xxx.xxx.xxx:xxxx\InstanceName
Address-port\(local),       xxx.xxx.xxx.xxx:xxxx\(local)

Open in new window

rayluvsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
You have to know what restrictions exist on the Vpn meaning the access might be limited to the remote server (RDP) and no other access permitted via the VPN.

See if you can after establishing the VPN, use ssms to see if you can connect to the ip\instance of the remote SQL.
Telnet remoteip port1433 or it can be anything else configured.....
rayluvsAuthor Commented:
Yes, we'll check on those restriction tomorrow.

As to "connect to the ip\instance of the remote SQL", that's line 5 (already tried it)

Telnet remoteip port1433 failed, but the port is the correct one.  Ran a script at the remote, and returned 1433

2016-08-24 16:59:24.690	Server	Server is listening on [ 'any' <ipv6> 1433].
2016-08-24 16:59:24.690	Server	Server is listening on [ 'any' <ipv4> 1433].
2016-08-24 16:59:24.700	Server	Server is listening on [ ::1 <ipv6> 1434].
2016-08-24 16:59:24.700	Server	Server is listening on [ 127.0.0.1 <ipv4> 1434].

Open in new window

arnoldCommented:
When the VPN is established run
netstat -rn to see the routing table.
See whether the ip of the SQL is part of the included ip ranges known on your system.
Let's say your local lan is 192.168.0.0/24
The SQL server is 172.16.0 2
VPN ip 10.0.0.3

Your routing table
0.0.0.0 0.0.0.0 192.168.0.2
10.0.0.3 255.255.255.255 ...
10.0.0.0 255.0.0.0  10.0.0.3
172.16.0.0 255.255.255.0 10.0.0.3

Etc,,.
You could try if the SQL segment is not in the routing table..
route 172.16.0,0 mask 255.255.255.0 10.0,0.3
This will add the routing entry, but would require that the remote site has a path from the SQL segment to the VPN segment for this to work.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

rayluvsAuthor Commented:
Thanx, just tried it; it's not in the routing table.

We'll check tomorrow.
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Even if you get the VPN to route to MSSQL, only the VPN client machine (nothing else on the same LAN) is able to use that - assuming you connect with a VPN client.
rayluvsAuthor Commented:
Assuming when you say VPN client machine you are referring to us (our pc connecting to that VPN address)?

Reading again your entry in 41774266, we didn't check if the SQL was part of it (instead we were looking for the VPN address, which wasn't there).

We will check again when we get to the PC.

Question, what exactly should we ask the admin of the PC we are trying to connect it's SQL instance? (So he/she can tell us with clarity the what-to-do)
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
The VPN Client machine is the one initiating the connection (and using RDP). If this is the same machine which has the MSSQL 2014 instance, fine. If not, you can't use the client's connection from a different machine, the MSSQL machine has to run its own VPN client connection. However, having more than one VPN connection from the same public IP (yours) causes failures or unstable connections.

To stop confusing us please use different symbolic addresses for public and private addresses, and for each side (making it at least 4 addresses).
Also tell us which kind of VPN you use: Did you have to install a VPN Client, then tell us its name (e.g. "Cisco AnyConnect Secure Mobility Client"), and if you know the type (PPTP, SSL, IPsec, ...). This helps us to give advice on what to look for, and maybe change on your side.
rayluvsAuthor Commented:
Gotta tell u, each answer u give us even clears more our understanding!  Great info, thanx!!

As to comments,

- we are the the one initiating the connection with Windows Remote Desktop (so we are the VPN client)
- our machine isn't the PC that have the MSSQL we want to connect to.  The remote address we connect to has the instance we want to connect to.
- our PC has SQL2014 and we want to use this apps to connect to the remote address SQL (which is version 2008/r2)
- what we want to do is the same as when a SQL instance is found with our local LAN, we use our SQL2014 apps and connect to that local (other) SQL instance by pc-name\instance.  We wants to do this but with the remote address.

We understand that the remote address we connect to is a private address; it's only one.  When we write xxx.xxx.xxx.xxx we mean only one address (hope this is your question on this part).

We didn't install no VPN client installed on our PC.  We were given one (1) remote address and  just connect to that remote address via Windows Remote Desktop (no other apps).

Hope this clears ups bit on our end.

As to what we going to ask the admin on the remote address, is "what configuration do we need to do at our end in order to connect directly to your SQL2008 r2 instance?"
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
What do you mean by "MSSQL 2014 apps", exactly? I read it as you want to connect from your local MSSQL 2014 server instance to the remote MSSQL 2008(r2) one.

If I understand
We didn't install no VPN client installed on our PC.  We were given one (1) remote address and  just connect to that remote address via Windows Remote Desktop (no other apps).
correctly, you are not using a VPN. You use RDP against a public IP address. If so, then no, "you cannot do that". RDP only transports RDP, i.e. the graphic session info and keyboard/mouse data (plus some security related stuff and some sharing options for mapping local drives and printers remotely). That connection is not able to tunnel anything else.
You would need a direct MSSQL connection (usually port 1433) - but hell no, this will not happen if the remote site's admins are in their senses, as the connection is unsecured and unencrypted.

You can ask for getting VPN access, but since the MSSQL server needs to have that connection always-on, it might get tricky and/or flaky.

Bad news for you, I know. To change it, significant effort and knowledge is required on both sides. A simple PPTP VPN can work well and from start with Windows OS, but there are many pitfalls, and the path might by a long one ...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rayluvsAuthor Commented:
Thank you very much! We feel very informed and have discussed our situation with the IT and it will be attended!

Thanx
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VPN

From novice to tech pro — start learning today.