When connected with a VPN, I cannot type \\servername and get to my server's share

rexxnet
rexxnet used Ask the Experts™
on
I must be having problems with the DNS somewhere in my configuration.  I can access the server with its IP address without issue.  I'm a novice; so, please dumb it down for me on what I need to look for and/or make changes to.

As always, thanks for your help!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
bacause samba names does not translating into other network
use \\ip_address\
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
@pilson66: SAMBA is an Linux implementation of NetBIOS. We are talking about Windows. But you are still correct about name resolution.


@rexxnet,
NetBIOS name resolution over VPN is somehow a difficult topic. If DNS is set up correctly for the VPN (!), it works, but that requires that the remote DNS server is the only one be used, and the DNS suffix (like mycompany.local) for the remote site is set up in your client. Unlikely that it is, and it would require you to switch settings between being connected and not connected.

Hence the most easy setup if you want to utilize a few static addresses is to keep them in your HOSTS file, which is %WinDir%\system32\drivers\etc\HOSTS . Most likely you do not have that file - then create it, else just append entries in the format
   remote.ip.addr.here         nameToUse
   remote.ip.addr.here2       nameToUse2
That allows for name resolution of those named devices.

In a more dynamic environment, or where you do not want to keep a HOSTS file, which needs to be maintained manually, you can set up a WINS server on the VPN side. WINS integrates and commnunicates with DNS, but just keeps the names, not the DNS suffix stuff. That way it works great and fully automated, as long as the VPN provides the WINS server automatically - a RAS server does, if the WINS server is set up in its own TCP/IP network properties.

Please ask for details, if anything above is unclear to you.
Can you ping you server by name?  That will tell if it is DNS.
From a command prompt (Start / run / Command)
type PING <and your server name.>  Like PING BIGBOX
if it fails to resolve to an IP address, it is a DNS isue.

To fix that on YOUR PC you must add an entry in
C:\WINDOWS\SYSTEM32\DRIVER\ETC\hosts        (a file with not extension)
This looks scary but is dead simple.
If the file does not exist, there is a sample file called hosts.sam copy it to hosts.  (no extension)
Edit hosts.
All those lines starting # are just comments.
add a single line to the end of the file with the IP address of the server SPACE and the name you want to use.  for example
102.54.94.97 BIGBOX
save the file and be sure Notepad doesn't add .txt to the filename.  if it does, rename the file on disk.

you can now PING BIGBOX
so you can now use \\BIGBOX\etc\etc\etc

Hope that helps,
Sean

How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Forgot to say that you might need to do the same change to LMHOSTS in the same folder when you change HOSTS. HOSTS is TCP/IP, LMHOSTS is used for all NetBIOS related stuff.

Commented:
The biggest problem I see when trying to do this over a vpn connection is where the user outside the connecting through the vpn is using an ip address scheme that matches the ip address scheme that the dns servers are on. For instance the corporate network is using 192.168.1.x for all their servers, most home routers also use 192.168.1.x by default. If you change the home network to another scheme dns resolution works as expected.
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Oh no, it is not thaaat simple. The remote DNS server is only queried if use also use "Use Remote Gateway" in the dial-in properties. Else the remote DNS server is ignored.
But nevertheless, having the same IP scheme is breaking VPN anyway - and as stated, access by IP addresses work fine.

Author

Commented:
Sorry guys.  Had a few customers.  

Sean.  Please see the image.  How do I edit the host file? host file

Author

Commented:
mrhamen.

That's exactly what's going on, i'll bet.  I think I'll tether and try and connect with DNS just for kicks.  I'll let ya know how that turns out.

Commented:
mouse right click, open with... choose "notepad"
Commented:
Usually fixes it for me. As for editing the host file I'll jump in quick and tell you simply right click on the file choose open with edit it either in wordpad or notepad. Then make the entry you need save the file and give it a reboot.

Author

Commented:
Sean:

Your solution worked perfectly!

mrhame:

I'm embarrassed I didn't think of the "open with"  LOL.  Thank you.  Reboot was not required.  Use default gateway is not required either.

Author

Commented:
While everyone had a correct answer, Sean and mrhamen presented it most clear.  Thanks for everyone's input!

Author

Commented:
I meant use remote gateway is not required
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Sorry, but I have to object, as the choice of accepted answers appears arbitrary to me, for several reasons:
If someone answered first correctly, that post needs to get points. If you think it was less detailed, or you could not understand it as well as other posts, you might assign smaller points.
http:#a36311773 isn't an answer to the question
http:#a36310107 doesn't add anything to what I posted in http:#a36310043. Further providing the Windows path literally can be an issue, e.g. if you OS is installed on a different partition (while that is nit-picking, if it works for you). I really think my statement about using the HOSTS file is very clear, without any doubt. You can enter the path I provided into Notepad, Explorer, aso., and it works.
Though it is indeed your decision which posts you accept, you need to be fair in doing so.
Qlemo - I didn't mean to steal anyones "points", frankly I dont care about points.  But It took me quite some time to type my answer and yours was not there when I started my answer.  if it had been I  would not have tried to "upstage you."


Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Sean,
That is not the point, and I was not trying to blame you for anything.
It's just that in such cases the first answer gets the points, if there is reasonable time between comments.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial