SOLVED - DD-WRT NAS connection over OpenVPN Tunnel

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
shacomm
DD-WRT Novice


Joined: 05 Sep 2014
Posts: 6

PostPosted: Fri Sep 05, 2014 16:47    Post subject: SOLVED - DD-WRT NAS connection over OpenVPN Tunnel Reply with quote
I've completed the setup of an OpenVPN tunnel into my NetGear WNDR3700 running v24-sp2 (03/25/13) std.

I am getting a valid VPN connection (192.168.10.2), I am able to ping the local IP addresses (router: 192.168.25.1, pc: 192.168.25.11 etc.) from my remote machine (laptop: 192.168.1.12).

I have a Samba share setup in DD-WRT and when I am on the local network I am able to Map the NAS as a network drive. But I am unable to do so on the laptop when I am connecting via the VPN.

Any insight on what else I need to configure to attach to the NAS from the remote location?


Last edited by shacomm on Sat Sep 06, 2014 20:12; edited 1 time in total
Sponsor
shacomm
DD-WRT Novice


Joined: 05 Sep 2014
Posts: 6

PostPosted: Sat Sep 06, 2014 14:29    Post subject: Not there yet... but making progress Reply with quote
In addition to being able to ping the router and PCs on the host network I am now also able to connect to the Internet via the OpenVPN tunnel. Smile

Services > VPN > OpenVPN Server/Daemon (GUI)
Redirect default Gateway= [on]
Additional Config [
comp-lzo
push "dhcp-option DNS 192.168.25.1"
push "dhcp-option DNS 8.8.8.8"
]

(Note I removed all the duplicate / possibly conflicting stuff from Additional Config seen in the screen shot above.)

Admin > Commands > Firewall [
iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 192.168.10.1/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT

iptables -I FORWARD -i tun0 -s 192.168.10.0/24 -o `get_wanface` -m state --state NEW -j ACCEPT
iptables -t nat -I POSTROUTING -s 192.168.10.0/16 -o `get_wanface` -j SNAT --to `nvram get wan_ipaddr`
]

Note: 192.168.10.0/24 is my VPNs subnet.

The last two lines did the trick this is thanks to rizla7 in this thread:
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=260810

At this point I'm connected, I can tunnel through to the Internet, I can PING the machines on the host subnet, but I still can't see shared drives etc.
shacomm
DD-WRT Novice


Joined: 05 Sep 2014
Posts: 6

PostPosted: Sat Sep 06, 2014 18:59    Post subject: And done! Reply with quote
This fixed my problem... I needed to tell the client to get its WINS from the DD-WRT OpenVPN router.

Services > VPN > OpenVPN Server/Daemon (GUI)
Additional Config [
comp-lzo
push "dhcp-option DNS 192.168.25.1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option WINS 192.168.25.1"
]

I now have my NAS setup as a networked drive!

PS - If you are not logged in to the forum you won't see the GUI setup I used so setup a dd-wrt.com/phpBB2 account and login. Smile
shacomm
DD-WRT Novice


Joined: 05 Sep 2014
Posts: 6

PostPosted: Sat Sep 06, 2014 19:57    Post subject: DD-WRT, OpenVPN, NTFS NAS with Win7 Client on WNDR3700 Reply with quote
Here's my final setup.
-Host: 192.168.25.0
-VPN: 192.168.10.0
-Remote: 192.168.1.1
shacomm
DD-WRT Novice


Joined: 05 Sep 2014
Posts: 6

PostPosted: Sat Sep 06, 2014 20:09    Post subject: Win7 map NAS as Network Drive Reply with quote
Here's the windows mapping
Cantenna
DD-WRT User


Joined: 28 Feb 2011
Posts: 125

PostPosted: Wed Jun 29, 2016 12:37    Post subject: Reply with quote
Thanks
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum