mapping network drives on a qnap NAS vpn
I have recently installed a few QNAP NAS servers far various business customers.
Since I’m not very familiar with NAS servers in general, and since one customer specifically requested VPN access via the NAS server, I decided to see what was achievable with this type of NAS server.
The number of options available is staggering, and its all Linux-based.
The QNAP servers can do:
- Microsoft, Linux and Apple networking
- Webserver file serving
- itunes server
- Apple time machine support
- VPN
- Joomla, WordPress, phpMyAdmin, vtigerCRM, Magento, etc
- print server
- database server
- backup server
- uPNP media server support for various protocals
- Multimedia Station for serving Audio, Video, and Photos
- Surveillance camera support
In this particular case, I just wanted to enable VPN support, and map a network drive, so that a remote application could access data files on the server
Enabling and configuring VPN is quite easy, as the QNAP website guides you through the process (I decided to use PPTP, as it seemed much simpler to setup).
But once I had established a VPN connection, what next? How do I map a network drive?
I eventually found the solution as follows:
While you are configuring the server via the web admin panel, go to: Application Servers -> VPN Service
make a note of the VPN client pool. it should be something like:
172.19.0.2 – 192.19.0.254
That means the server will appear on the VPN client as: 172.19.0.1
After that, mapping from the windows command line (cmd.exe) is quite easy.
Lets assume that the servers folder share is SDRIVE, the server username is joe (password is pass), and you want to map the folder share to drive W:
You type:
net use w: \172.19.0.1SDRIVE pass /user:joe /persistent:yes
after that, you can use the w: as if it was a local (albeit slower) drive.
Although I haven’t been able to test it yet, I have heard that you can lose internet access unless you go to the advanced ipv4 settings of your network settings, and disable the setting: use default gateway on remote network.
I actually haven’t played with any of the QNAP NAS boxes, but have had a lot of experience with Synology. Synology has a really great GUI that makes anything on it as easy as pie, plus you can always login via SSH to do even more fun stuff as it’s all linux-based.
Regarding the “use default gateway on remote network” – interesting. I actually have never tried disabling that for the VPN connections I configured. I wonder if that setting actually modulates the route of their internet traffic? I’ve never noticed a loss of connectivity on machines connected via VPN…
Can confirm that turning off “use default gateway on remote network” is the best course of action. With it on you are using the remote machine’s internet connection. With it off, you use your own but can still access remote network resources.