OpenWrt Forum Archive

Topic: openvpn client

The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

in a configuration with a openvpn client on a router, how to reach the devices connected to the router?

To explain:
lan 1: 192.168.1.x
lan 2: 192.168.0.x

vpn server on pc connected to lan1
vpn client  on router openwrt on lan2
ipcamera 192.168.0.122 connected to lan2

from pc i can connect to the router but i cant reach the ipcamera

A picture if the network is always helpful.

Take a look at this
https://community.openvpn.net/openvpn/wiki/RoutedLans

OpenVPN need to know how to send you to the other network

In the Router on Lan1 you need to see a route sending to tun0.
You can check router doing this:

route -n

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         x.x.x.x              0.0.0.0         UG    20     0        0 eth0.2
0.0.0.0         192.168.1.1     0.0.0.0         UG    30     0        0 eth0.3
10.18.0.0       10.18.0.2       255.255.255.0   UG    0      0        0 tun0
10.18.0.0       0.0.0.0         255.255.255.0   U     0      0        0 tun0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
192.168.1.0     0.0.0.0         255.255.255.0   U     30     0        0 eth0.3
192.168.1.1     0.0.0.0         255.255.255.255 UH    30     0        0 eth0.3
192.168.11.0    10.18.0.2       255.255.255.0   UG    0      0        0 tun0       <---- this line is the important!
xxx.xxx.xxx.xxx     0.0.0.0         255.255.255.248 U     20     0        0 eth0.2

In this case. 192.168.11.x is going to tun0 (the vpn interface)

Best regards

gamba47

(Last edited by gamba47 on 12 Aug 2017, 03:27)

The discussion might have continued from here.