OpenVPN server - devices not accessible

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


Joined: 22 May 2013
Posts: 12

PostPosted: Sat Sep 16, 2017 13:03    Post subject: OpenVPN server - devices not accessible Reply with quote
Hello,

I set OpenVPN server on my DD-WRT and I'm able to connect from my phone to my VPN, connect to internet using my home IP, access the DD-WRT's configuration page (192.168.0.1) and the Sipura SPA 3102 (ATA)'s configuration page (192.168.0.6)

BUT

My second DD-WRT router configured as a bridge is not accessible typing 192.168.0.2 on my browser. Same thing for my NAS (192.168.0.5) whereas I can access to both directly without using my VPN.

That's strange...

Here's my OpenVPN server configuration :





And my phone's configuration :

Code:

client
dev tun
proto udp
remote ip.richard.ooo 1194
resolv-retry infinite
nobind
persist-key
persist-tun
comp-lzo
verb 3

<ca>
-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----
</ca>

<cert>
-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----
</cert>

<key>
-----BEGIN PRIVATE KEY-----

-----END PRIVATE KEY-----
</key>


Under administration - shell I added this :



Can someone help me please ?

Thanks !
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Sat Sep 16, 2017 13:12    Post subject: Reply with quote
Do 192.168.0.2 and 192.168.0.5 have 192.168.0.1 as gateway?
☆ Ricky ☆
DD-WRT Novice


Joined: 22 May 2013
Posts: 12

PostPosted: Sat Sep 16, 2017 13:16    Post subject: Reply with quote
Yes they are connected on the same EA6500 router which is also the DHCP server
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 6291
Location: Texas

PostPosted: Sat Sep 16, 2017 16:36    Post subject: Reply with quote
If 2nd router is config as repeater bridge that may be the problem.
Not sure about details but routing from tun to RB on the LAN can cause trouble....
You can look on you main router at LAN connections and likely see weird things about the RB and anything connected behind it.
Repeater Bridge is not a good solution to bridge wirelessly
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Sat Sep 16, 2017 16:44    Post subject: Reply with quote
Change the nat rule:

iptables -t nat -I POSTROUTING -o `get_wanface` -j MASQUERADE
☆ Ricky ☆
DD-WRT Novice


Joined: 22 May 2013
Posts: 12

PostPosted: Sat Sep 16, 2017 17:35    Post subject: Reply with quote
mrjcd wrote:
If 2nd router is config as repeater bridge that may be the problem.
Not sure about details but routing from tun to RB on the LAN can cause trouble....
You can look on you main router at LAN connections and likely see weird things about the RB and anything connected behind it.
Repeater Bridge is not a good solution to bridge wirelessly


There are only a computer and a PS3 on the second router. The NAS is directly connected on first router.

Per Yngve Berg wrote:
Change the nat rule:

iptables -t nat -I POSTROUTING -o `get_wanface` -j MASQUERADE


I deleted my NAT rules and added this line, it helped me access my second router (192.168.0.2). I still cannot access my NAS.
☆ Ricky ☆
DD-WRT Novice


Joined: 22 May 2013
Posts: 12

PostPosted: Sun Sep 17, 2017 18:55    Post subject: Reply with quote
It seems I'm not the only one and it's related to Synology...

https://forum.synology.com/enu/viewtopic.php?f=173&t=122075&start=30#p473608

Quote:
Okay, solved. My own fault really. So my setup is a little complex. The router has 3 endpoints:

1. WAN (standard unencrypted traffic)
2. London VPN client - using a VPN provider to route some traffic out to the web encrypted/anon.
3. Swedish VPN client - using a VPN provider to route some traffic to a Swedish VPN endpoint.

I use policy-based routing to send different traffic goes out a different way. Some basic traffic (my IoT devices, lightwaveRF etc) goes straight out over the WAN. Most traffic from my laptops and phones goes out to #2, which gives my encryption and anonymity from my ISP, but without messing up my Geo-Location. All traffic from my NAS (which runs Sickrage, Couchpotato and DS Download) goes out over #3, so that my torrent searches work properly (since UK ISPs block torrent sites).

So you know what's coming... when I connect in via my OpenVPN server on the router, I'm coming in directly over the WAN, and not through either VPN pipe. But all the NAS traffic gets force-routed out over the VPN client to Sweden, so is whisked away and never makes it back out via the VPN server.

Added a couple of exception rules so that traffic with source/dest of 10.8.0.0/24 will be routed back out over the WAN, and I'm up and running.


I use ExpressVPN and force my NAS to use the VPN (policy based routing : 192.168.0.3/32) it seems it could explain the problem.

Quote:
Added a couple of exception rules


Can you help me with this ?


Last edited by ☆ Ricky ☆ on Sun Sep 17, 2017 19:26; edited 2 times in total
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 6291
Location: Texas

PostPosted: Sun Sep 17, 2017 19:11    Post subject: Reply with quote
☆ Ricky ☆ wrote:
It seems I'm not the only one and it's related to Synology...

https://forum.synology.com/enu/viewtopic.php?t=122075


Must have some type firewall builtin ????
Might check into that and open the ovpn server's IP range to it.
or
probably work fine if you was running an ovpn server
on a WAP somewhere within your network.
☆ Ricky ☆
DD-WRT Novice


Joined: 22 May 2013
Posts: 12

PostPosted: Sun Sep 17, 2017 19:31    Post subject: Reply with quote
See the latest posts.
☆ Ricky ☆
DD-WRT Novice


Joined: 22 May 2013
Posts: 12

PostPosted: Tue Sep 19, 2017 18:52    Post subject: Reply with quote
Sorry but I still have the same problem and don't know what to do in order to access my Synology NAS using the OpenVPN server...
☆ Ricky ☆
DD-WRT Novice


Joined: 22 May 2013
Posts: 12

PostPosted: Thu Sep 21, 2017 17:51    Post subject: Reply with quote
Hello,

My NAS wasn't available because it was set to connect to internet via ExpressVPN (I used policy based routing). I've disabled it and can now access my Synology's configuration page.

But now how can I continue tu use ExpressVPN with my NAS but make it accessible from other devices on my LAN ?

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