Cannot connect to windows server by name over vpn connection

6,537

Solution 1

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.

Solution 2

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 10.0.0.1 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.

Solution 3

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.

Share:
6,537

Related videos on Youtube

ErocM
Author by

ErocM

Updated on September 18, 2022

Comments

  • ErocM
    ErocM almost 2 years

    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 10.0.0.0 255.0.0.0 10.0.0.1 10.0.0.2 21

    10.0.0.2 255.255.255.255 On-link 10.0.0.2 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

  • ErocM
    ErocM almost 12 years
    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
    ErocM almost 12 years
    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
    ErocM almost 12 years
    also 'to your internal DNS servers' what do you mean by this? Which dns servers?
  • ErocM
    ErocM almost 12 years
    I added a comment in the original post to this.
  • HopelessN00b
    HopelessN00b almost 12 years
    @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.
  • ErocM
    ErocM over 11 years
    we needed to add a domain controller which helped get the dns right. This got me in the right direction.