Configure Hosts file with VPN?

I have a VPN connection that has worked great on one of my laptops (had a mapped drive to the server).  Then the other day I would correctly log in to the VPN client, but my mapped drive would not work.  I just kept getting an error that said it couldn't map the drive.  So I disconnected it and have been trying to 2 days now to get the link to work, but it won't.  Do I need to adjust my hosts file or something?  
bengelhartAsked:
Who is Participating?
 
Rob WilliamsCommented:
I have had problems with a few routers. Sometimes they will come out with firmware updates to resolve, however, I have found from time to time enabling a totally unrelated service will disable the capability to successfully use the VPN. If you had a chance and you think it might be the case, set the router to all default settings except the VPN configuration and re-test.
0
 
Rob WilliamsCommented:
Does the VPN appear to work properly? Can you ping remote computers and connect to any shares ? You can test this by entering in the Start/Run box, the IP address of any computer at the remote site with a shared resource, such as  \\192.168.123.123\
It should open a browser window displaying shares at that IP.

If that works then likely something at the remote end has changed. You could re-map it using the IP rather than the computer  name. To do so at a command line enter:
   net use z:  \\192.168.123.123\Share name
Before doing this you should delete the existing mapping with  net use z: /delete

or, if you were using the Hosts or LMHosts files make changes to them. They are located in:
c:\windows\system32\drivers\etc\
Open with notepad and locate the computer you need to change and change it's IP. When you save make sure you enclose the file name in quotations like;  "Hosts" or it will add a txt extension. The Hosts and LMHosts should have no extension. The LMHosts file if not in use will have a .sam extension (SAMple)

See if any of that is any help. If not please advise and we can try other options.
0
 
bengelhartAuthor Commented:
I will try and look at the hosts file, and I will also relink using the IP address of the server.  I just recently changed the workgroup name, could that be an issue?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Rob WilliamsCommented:
Workgroup name shouldn't affect it. It should be a wrong IP address or unable to resolve the name to an IP. Let us know how you make out.
0
 
bengelhartAuthor Commented:
Will do.  I won't get a chance to test it until noon today or so.
0
 
Rob WilliamsCommented:
No rush,
--Rob
0
 
bengelhartAuthor Commented:
when I alter the hosts file, the IP address should be to my firewall and the description can be anything or does it have to be the name of the server I am connecting to?    64.81.156.66     ?what do I type in here?
0
 
Rob WilliamsCommented:
It can be anything you like (no spaces) and then use that name to connect. So in the hosts file you would put:
64.81.156.66      MYVPN
Make sure you hit enter to insert a carriage return at the end of the line and save with no file extension, using quotes will ensure that  "hosts"
0
 
bengelhartAuthor Commented:
Thanks I will give this a try!
0
 
Rob WilliamsCommented:
You can also connect the VPN using the firewall's IP rather than a name. This is probably the better way to test or isolate the problem as it eliminates name resolution for the connection.
0
 
bengelhartAuthor Commented:
Well it isn't working still.  My VPN CLient logs on.  I set the Host file to the IP address of the firewall and named it the name of the server.  Still nothing.  Do I need to put a different IP address in?  Does it need to be the 10 base IP address - 10.1.1.2?
0
 
Rob WilliamsCommented:
Whoops, maybe I misunderstood.
Hosts file is for DNS names and the LMHosts file is for NetBIOS names, though either will usually work. The way you configure both is identical including saving without an extension. LMHosts initially has a .sam extension indicating sample file. Both are located in the same folder.

If you are using a DDNS (Dynamic Domain Naming Service) for your public IP, that of the firewall (such as myoffice.dnsalias.org), or if you just want to use a name as a shortcut you can use the Hosts file with an entry like:
66.66.123.123       myoffice.dnsalias.org
66.66.123.123       MyOffice

However, if you are wanting to connect to a particular computer at the other end of the tunnel you would use the LMHosts file, and add the computer's IP and it's name such as:
10.1.1.123     Server1
10.1.1.234     MyOfficePC
To check your LMHosts file entries are accepted at a command prompt enter
  nbtstat  -R
to purge and reload the local name cache
then enter
  nbtstat  -c
to display the current name cache which should include your LMHosts file entries.
Note; the nbtstat "switches" R & c are case sensitive.
0
 
bengelhartAuthor Commented:
When I run those utiltiies after adding to my LMHosts file, I get that my Sonicwall Adapter has 0.0.0.0.0 as an IP address and that no names are in cache.  

Here is my entry in LMHosts:

10.1.1.2   ACC2

0
 
bengelhartAuthor Commented:
Here is a report on the IP info of the VPN virtual network adapter:

Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : SonicWALL VPN Adapter
        Physical Address. . . . . . . . . : 00-60-73-ED-C6-6B
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : No
        IP Address. . . . . . . . . . . . : 0.0.0.0
        Subnet Mask . . . . . . . . . . . : 0.0.0.0
        Default Gateway . . . . . . . . . :
        DHCP Server . . . . . . . . . . . : 255.255.255.255
0
 
Rob WilliamsCommented:
The Sonicwall virtual adapter will have no assigned IP address information unless it is connected to the remote site. The IP, gateway and such is assigned by that site, or is this happening when you are connected, or trying to connect?
0
 
bengelhartAuthor Commented:
This is while I am connected supposedly
0
 
Rob WilliamsCommented:
Then you are not, I would say.
Probably one of:
1) it is the wrong public IP
2) there is a router/NAT device between the modem and the Sonicwall
3) the SonicWall is not configured properly to assign an IP
0
 
bengelhartAuthor Commented:
ALright.  I will take a look at it from the firewall side.
0
 
Rob WilliamsCommented:
Let me know how you make out.
Perhaps I can come up with some more details later. I'm off on a service call for a while.
0
 
bengelhartAuthor Commented:
Thanks.  I apreciate the help...
0
 
rsivanandanCommented:
Instead of LMHOSTS, add the server's ip to HOSTS file and see if it works.

Cheers,
Rajesh
0
 
bengelhartAuthor Commented:
will do
0
 
Rob WilliamsCommented:
Did you ultimately get tjis working bengelhart ?
--Rob
0
 
bengelhartAuthor Commented:
Well yes and no.  I got it working from another remote site.  It turns out that my new router (it is a Dlink gigabit gaming router) is unfriendly to VPN.  I need to call Dlink and figure out why it isn't working.  
0
 
bengelhartAuthor Commented:
Yeah I think you are right.  I am going to be working on it tomorrow.  I will update this post with my findings.
0
 
Rob WilliamsCommented:
Just curious as to how you make out.
Cheer,
--Rob
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.