Cannot mount a CIFS network share over VPN
Solution 1
I was finally able to solve this problem; I believe it was caused by an IP conflict.
Both my home network range as my office range used the 192.168.1.0
range; I changed my home range to 10.0.0.0
and voila!
Additionally, I added 192.168.1.0
with netmask 255.255.255.0
as a local route to the VPN and checked 'use VPN only for routes on its network'.
Solution 2
Try to add .domain to your server. i.e. //server2008.vpndomain.local/share. Use domain of your remote VPN server instead vpndomain.local
Solution 3
You need a way to resolve the server name. When you are connected locally this can be done with the cifs broadcast name resolution service, but this does not work over a vpn or other routed connection. If the host name can not be resolved by your DNS server then you either need to use the IP address in your fstab, or add an entry to /etc/hosts.
Related videos on Youtube
Aron Rotteveel
Updated on September 17, 2022Comments
-
Aron Rotteveel over 1 year
I have setup u VPN connection to our Windows 2008 server at the office and it seems to work fine.
For some reason, however, I still am not able to access the network shares over a VPN connection using my standard fstab entries. When I am physically connected to the network, it works fine, but now when trying this over VPN I get the following error:
mount error(110): Connection timed out Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
My
/etc/fstab
looks like this://server2008/share /mnt/share cifs iocharset=utf8,credentials=/home/aron/.smbcredentials,uid=1000 0 0
As said, it works fine when physically connected, but over VPN it just wont work.
Any help is appreciated.
EDIT:
It seems the Windows firewall is making things harder on me. When I turn it off, I get a bit further, although I still get the following error message:
Unable to find suitable address.
The strange thing is that I have file sharing added as an exception to the firewall. Port 137-139 and port 445 are open, which should suffice, shouldn't it?
EDIT Jan 20th:
Still not working. When I have the firewall turned on, it times out. When I turn it off, I get the not suitable address error. Turning the firewall off is not an option, by the way.
-
Admin over 13 yearsOnce you enter the realm of VPN all traditional sentiments of what should be sufficient go out the window.
-
-
Aron Rotteveel over 13 yearsThanks for the reply. I actually have a hosts entry for the server setup and pinging works just fine.