I have a rented dedicated windows server on a public ip that is acting as a SQL Server and VPN server. I need to connect to this server via computer name to get replication in place. I cannot use an ip address due to this issue:

enter image description here

So, due to this, we are going the VPN route.

That is my primary issue:

After I am connected to this server's vpn, I can connect to SQL Server using the ip address but I cannot connect by the computer's name as you can see below...

enter image description here

enter image description here

Right now, there is no hardware firewall on it since I had it removed to test this issue.

I am running Windows 2008 Enterprise Server as the VPN server.

I am not sure if the route print will help any from the workstation trying to connect but here is the info:

IPv4 Route Table

Active Routes: Network Destination Netmask Gateway Interface Metric 21 On-link 276

Any other info needed?

Thanks for the help!

========= CLARIFICATION ON A FEW THINGS #1 =========

This is the server's info:

enter image description here

This is the workstation that is trying to connect:

enter image description here

I connect to the server via "Control Panel\Network and Internet\Network and Sharing Center\Connect or Disconnect"

You can see here that I am connected:

enter image description here

========= CLARIFICATION ON A FEW THINGS #2 =========

I've tried to connect directly to the Sql Server as I did above but with the computers name and I couldn't get to it.

Here I am trying to net view it from the workstation and it couldn't find it:

enter image description here


Check your DNS. Your DNS requests are probably going to your ISP's DNS servers, which do not have a record for your server, rather than your internal DNS servers, which do. It's a fairly common problem with VPN connections, at least in my experience.

The specific resolutions depend on what type of VPN you're utilizing and the client you're accessing the VPN with, so if you need help resolving that, you should include that in your question, or start a new one. For a hacky workaround, try manually setting your connection's DNS server to your internal DNS servers, which is also a good way to verify your issue is cause by DNS requests going to the wrong name server.

  • I'm not sure I understand the question, I thought I had supplied what vpn I am using. I'm using the windows 2008 built in vpn and connecting with windows vpn client. Is that not correct? – ErocM Aug 27 '12 at 21:19
  • also 'to your internal DNS servers' what do you mean by this? Which dns servers? – ErocM Aug 27 '12 at 21:20
  • @erocm internal DNS servers being the ones that translate the SQl server's name to a private IP address. A public/externally facing DNS server sure isn't doing that. Re, VPN, I was looking for technical details, but verify the issue first by finding out where your DNS requests are goind and/or changing your connection's DNS settings to your domain's DNS servers manually. – HopelessN00b Aug 27 '12 at 21:29
  • we needed to add a domain controller which helped get the dns right. This got me in the right direction. – ErocM Oct 8 '12 at 16:09

It looks like you're going to need something in place to resolve a host name. A quick fix would be to simply add hostname to the hosts file on the machine you are trying to connect from.

Depending on your needs though, if you are going to need to connect from multiple locations, or plan on expanding the number of SQL servers on that VPN, you might look into a DNS or NetBIOS based solution for that VPN so that anyone who connects to resolve the name of that SQL server.

  • Sql Server subscriptions does not allow alias'. I have tried this but it sees that it is an alias and I get the first picture that I linked above. – ErocM Aug 27 '12 at 21:16

Since you're not using a FQDN for the server when connecting, you probably need to specify a DNS suffix for your VPN connection. Doing an nslookup for servername.yourdomain.com will confirm this.


It seems like the DNS queries and/or NetBIOS lookups are not finding the box on the remote network. Are you sure a DNS query for the machine name is actually returning the VPN'd IP address of the box?


are you using FQDN in your hostname, I haven't seen this specific with SQL server, but have seen it with scripted applications I've made that connect via VPN.

I won't be able to connect to


but I don't have issues connecting to

  • I added a comment in the original post to this. – ErocM Aug 27 '12 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.