Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


79 posts

Master Geek
+1 received by user: 1


Topic # 116489 30-Apr-2013 21:04
Send private message

Hi hopefully someone can help. I've set up a Qnap NAS with PPP VPN, mapped shares in the office on the local network with 192.168 etc but to use those drives remotely with the VPN they have to be mapped to 10.0.0 etc. What is the best way to handle this - create two mapped drives one for local one for remote and named accordingly? Or is there any way to have the same IP address in both locations?


Create new topic
635 posts

Ultimate Geek
+1 received by user: 32
Inactive user


  Reply # 808275 30-Apr-2013 21:40
Send private message

I think I know what you mean.

The VPN server hands out addresses in the 10.x.x.x subnet, for clients, but the remote lan is 192.168.x.x.

I have always found that you can access the 192.168.x.x lan when connected to the VPN.

How are you trying to connect to the samba share? )Maybe just try mapping from command line using IP's)

Remember that you may not get all broadcast traffic for network browsing on some VPN's. I cant remember what traffic a PPP VPN will transmit.

-Al

3409 posts

Uber Geek
+1 received by user: 404

Trusted

  Reply # 808298 30-Apr-2013 22:48
Send private message

What kind of VPN server are you using (or does the QNAP provide it?). You would probably be best to go with OpenVPN as it can pass routes to the VPN client e.g.

192.168.0.0/24 is your main subnet with QNAP device
192.168.1.0/24 is your VPN subnet

You can tell OpenVPN to advertise 192.168.0.0/24.

Maybe look at IPv6? No VPN necessary then :)





3237 posts

Uber Geek
+1 received by user: 633

Trusted

  Reply # 811412 5-May-2013 00:30
Send private message

I would run a batch script something like this


net use z: /d
net use y: /d
net use x: /d
net use z: \\192.168.0.x\sharename
net use y: \\192.168.0.x\sharename2
net use x: \\192.168.0.x\sharename3
net use z: \\10.0.0.x\sharename
net use y: \\10.0.0.x\sharename2
net use x: \\10.0.0.x\sharename3
exit


Then just double click on the batch file after you connect the ppp session or are connected locally to the same network as the qnap.

When the batch script runs, it does three things
1) Deletes the mapped drives X,Y,Z
2) Tries to connect X,Y,Z to the qnap when in the 192 range. If it cannot connect, they fail and it moves on
3) Tries to connect X,Y,Z to the qnap when in the 10 range. If it cannot connect, it probably already has when you are in the 192 range, or it will fail and move on to closing the script.

if you need to connect to the qnap with a specific username and password, use the command
net use z: \\192.168.0.x\sharename /user:Username Password
with a simple space between the username and password.
If you get errors saying that you cannot connect twice with the same username, for drives x and y you would connect without the usename and password because you already logged on when you mapped the z drive.

edit: the script will run so fast you cannot see the errors - so to troubleshoot, replace the exit command with pause and it will stop before closing the window at the end.






Ray Taylor
Taylor Broadband (rural hawkes bay)
www.ruralkiwi.com

There is no place like localhost
For my general guide to extending your wireless network Click Here




Create new topic

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.