Page 1 of 1

Unable to access NAS folders via VPN Server

Posted: Wed Oct 14, 2020 7:47 pm
by Lostinspace
Dear all

I have managed to set up a remote connection to VPN Server via OpenVPN. This works fine. I am able to ping the VPN Server and see the my user ID logged on the VPN Server.

However, I am unable to add the NAS folders as network drive on the Windows PC to access the data (\\NAS_ID\NAS_folder).

Any idea why? I assume the VPN Server does not allow to access NAS folders behind but I am lost to find the cause of the problem.

I have assigned the user permissions to VPN and disabled the firewall. Apart from this, the settings in VPN Server are standard.

Many thanks

Re: Unable to access NAS folders via VPN Server

Posted: Wed Oct 14, 2020 9:20 pm
by father.mande
Hi,

First try to use I.P. (The I.P. VPN assigned to NAS) to connect NAS Folder : ex. \\10.0.1.1\Public
... normally this works
think that you can used lmhosts file to associte I.P. and server Name .

To be able (if you config is totally correct) to use the NAS_Name as server name you must know the target LAN (LAN of the NAS)
so add in your client a route directive ...
ex. if subnet LAN of your NAS (different of the subnet LAN of your client (if not return to previous usage) is 192.168.1.0 add in openvpn config file client.ovpn
route 192.168.1.0 255.255.255.0 (adapt to your configuration)

Now you can try first using 192.168.1.xxx as server name then use the NAS name ... if it's not enough add in client lmhosts the association between Name and I.P.
ex. in windows it's in c:\windows\system32\drivers\etc

Philippe.

Re: Unable to access NAS folders via VPN Server

Posted: Thu Oct 15, 2020 4:31 am
by Lostinspace
Thanks Philippe.

The first option doesn't work.

Where can I find the target LAN IP? I have tried the IP displayed on LAN 1 and the NAS returned the login screen after mapping the NAS folder. However, the user password was not recognised by the system.

Omg why is Asustor so complicated. Synology NAS have a simple option "allow clients to access server's LAN" built in the VPN server.

Re: Unable to access NAS folders via VPN Server

Posted: Thu Oct 15, 2020 4:52 am
by father.mande
Hi,

All works as well in my own configuration ... so call the support

did you try using Control Center ?

difference between Syno and some other brand is simple ... opening access to LAN is very DANGEROUS in VPN routed mode and more using user / password
... so Asustor and other brand prefer to force you to understand the security hole you open
... the result of syno option is add a route (as explain) nothing more

perhaps it's a good idea to don't use an option (seem so simple) without understanding all the risks and constraints attached ...

F.Y.I. all my server (NAS multiple brand) are ONLY connected through VPN (but I use for important server a full OpenVPN with certificates (available in Asustor through Entware APKG) BUT manfully configured.

So call the support, you can get quick answer .

Philippe.

Re: Unable to access NAS folders via VPN Server

Posted: Fri Oct 16, 2020 1:03 am
by Nazar78
What Philippe commented is how it actually works, including the routings. Quite simple actually only that the client doesn't know all the routes behind the VPN server and you need to tell it where to route the requests. This routing is very useful especially if the client is connected to several VPN servers or endpoints but only one is the default gateway.

To make things simple, I take it you just simply installed the VPN server then enabled the default openvpn settings, installed the client and add the config/cert provided by the server to the client. If this is the case then the IP you're looking for to access your NAS is 10.0.1.1 not LAN 1 IP. Try http://10.0.1.1:8000/ or \\10.0.1.1\Home. You can only use the LAN 1 or 2 or bridged IP if you enabled the redirect gateway option in the openvpn server settings. This option will route not only the VPN segment but all your requests (exception for DNS if you specify one) through the VPN server.