[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Configure Hosts file with VPN?

Posted on 2006-05-10
29
Medium Priority
?
683 Views
Last Modified: 2010-07-27
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?  
0
Comment
Question by:bengelhart
  • 13
  • 12
26 Comments
 
LVL 78

Expert Comment

by:Rob Williams
ID: 16653912
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
 

Author Comment

by:bengelhart
ID: 16658162
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
 
LVL 78

Expert Comment

by:Rob Williams
ID: 16658201
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:bengelhart
ID: 16658278
Will do.  I won't get a chance to test it until noon today or so.
0
 
LVL 78

Expert Comment

by:Rob Williams
ID: 16658379
No rush,
--Rob
0
 

Author Comment

by:bengelhart
ID: 16691443
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
 
LVL 78

Expert Comment

by:Rob Williams
ID: 16691620
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
 

Author Comment

by:bengelhart
ID: 16691653
Thanks I will give this a try!
0
 
LVL 78

Expert Comment

by:Rob Williams
ID: 16691712
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
 

Author Comment

by:bengelhart
ID: 16704588
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
 
LVL 78

Expert Comment

by:Rob Williams
ID: 16704649
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
 

Author Comment

by:bengelhart
ID: 16708146
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
 

Author Comment

by:bengelhart
ID: 16708377
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
 
LVL 78

Expert Comment

by:Rob Williams
ID: 16708455
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
 

Author Comment

by:bengelhart
ID: 16708569
This is while I am connected supposedly
0
 
LVL 78

Expert Comment

by:Rob Williams
ID: 16708590
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
 

Author Comment

by:bengelhart
ID: 16708600
ALright.  I will take a look at it from the firewall side.
0
 
LVL 78

Expert Comment

by:Rob Williams
ID: 16708675
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
 

Author Comment

by:bengelhart
ID: 16708720
Thanks.  I apreciate the help...
0
 
LVL 32

Expert Comment

by:rsivanandan
ID: 16743335
Instead of LMHOSTS, add the server's ip to HOSTS file and see if it works.

Cheers,
Rajesh
0
 

Author Comment

by:bengelhart
ID: 16743551
will do
0
 
LVL 78

Expert Comment

by:Rob Williams
ID: 16910726
Did you ultimately get tjis working bengelhart ?
--Rob
0
 

Author Comment

by:bengelhart
ID: 16910752
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
 
LVL 78

Accepted Solution

by:
Rob Williams earned 2000 total points
ID: 16912555
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
 

Author Comment

by:bengelhart
ID: 16912662
Yeah I think you are right.  I am going to be working on it tomorrow.  I will update this post with my findings.
0
 
LVL 78

Expert Comment

by:Rob Williams
ID: 16912771
Just curious as to how you make out.
Cheer,
--Rob
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use NetMotion Mobility on your PC and plan to upgrade to Windows 10, it may not work unless you take these steps.
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question