How to enable openvpn client to access/browse LAN shares

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


Joined: 25 Mar 2014
Posts: 14

PostPosted: Tue Jul 16, 2019 20:29    Post subject: How to enable openvpn client to access/browse LAN shares Reply with quote
Hi Guys,

I have a home network with 3 PCs, all connected to my DD-WRT x86 Pro router. Everyting works great there. But, I'd like to access my LAN shares from my Android phone, while connected to the OpenVPN server that this router is running.

I am rruning this build (Firmware: DD-WRT v3.0-r40276 std). The phone can connect to the VPN server and access the internet but, not the local shares on the LAN. If I connect the phone to the Wifi network, it can access the shares just fine.

Here are my router settings
-----------------------------
LAN 192.168.4.0
VPN 192.168.5.0

push "route 192.168.4.0 255.255.255.0"
push "route 192.168.5.0 255.255.255.0"
push "dhcp-option DNS 8.8.8.8"



Firewall rules

iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 192.168.4.0/24 -j ACCEPT
iptables -I FORWARD 1 --source 192.168.5.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.5.0/24 -j MASQUERADE

--------


Any help please?
Sponsor
cubalibre
DD-WRT Novice


Joined: 25 Mar 2014
Posts: 14

PostPosted: Wed Jul 17, 2019 6:58    Post subject: Reply with quote
Hi eibgrad and thak you for your support. I access all my PCs by IP address, which I have assigned manually. There's no active DHCP service in my network.

I have tried pinging and, the PCs in the 192.168.4.0 can ping the 192.168.4.1 and even the 192.168.5.1 address, but, the phone, when connected to the OpenVPN cannot ping any of the above addresses. However it pings 8.8.8.8 etc.

My router config looks like this now
-----------------------

Additional Config
push "route 192.168.4.0 255.255.255.0"
push "dhcp-option DNS 8.8.8.8"


Firewall Rules
iptables -t nat -A POSTROUTING -s 192.168.5.0/24 -j MASQUERADE
iptables -t nat -I POSTROUTING -s 192.168.5.0/24 -o br0 -j SNAT --to $(nvram get lan_ipaddr)

---------------------------

Would something like "Redirect default Gateway" would have something to do with this? I have it disabled.

Also, the VPN status page, shows 192.168.5.1 as the external and internal IP.

Some years back, I had this setup working great, but, with different hardware.

Any suggestions what else could I try ?

Thank you.
cubalibre
DD-WRT Novice


Joined: 25 Mar 2014
Posts: 14

PostPosted: Wed Jul 17, 2019 9:35    Post subject: Reply with quote
Problem Solved!

I was getting a warning about LZO Compression. I had it set to "no", changing it to "disabled" made everything work!

I can now ping and browse every PC in my network from my phone.

Thank you very much for the support.
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