1

I have a remote server which in turn has access to a SQL Server instance running in the same network.

I am developing tools to use this SQL server, but have no backup or rights to backup/copy the structure of the database. Therefore I need access to this database on my development machine.

We connect to the remote server using TeamViewer, and can access the server using the TeamViewer VPN.

Is there any way I can set the server to "Forward" on all incoming connections on Port 1433 (these will only come over the VPN) to the local IP address for SQL Server?

Paul Grimshaw
  • 121
  • 1
  • 5

2 Answers2

2

See the Teamviewer manual here: http://www.teamviewer.com/en/res/pdf/TeamViewer7_Manual_RemoteControl_EN.pdf

According to page 21 when using TeamViewer VPN:

Note : If you connect your local computer to the remote computer via TeamViewer VPN, only those two computers will be linked together in a virtual private network. No other computers in the LAN of either computer will be accessible.

There might be a way to tell the Teamviewer VPN virtual adapter on the remote server to NAT traffic through to the SQL server, but they won't support it and doing so might cause other unintended consequences on the connection.

If you are developing tools that need access to this SQL server can't someone grant you access from your dev machine to it (via Teamviewer VPN, NATing your requests only through the firewall, etc.)?

TheCleaner
  • 32,352
  • 26
  • 126
  • 188
  • Many thanks for the answer, I suspected this might be the case. RE the last point, unfortunately not as the database is run and hosted by a third party. I'll just have to mimic the db structure/data manually locally and run through a few publishes a day. – Paul Grimshaw Jul 22 '13 at 15:06
1

Thanks to @TheCleaner for the guidance. However I found a workaround that I thought I'd share in case someone else runs into a similar situation.

The trick was to install SQL Server Express on the intermediate server which I have control over. I then added a "Linked Server" to the target SQL Server instance on a different server.

The TeamViewer VPN allows me to reach the intermediate SQL Server, and then I can query the Linked server from my development machine.

A small tweak to my code allows the queries to run against the linked server "server.database.dbo.table" rather than just "dbo.table" when I'm in development mode.

Paul Grimshaw
  • 121
  • 1
  • 5