FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
414 views 0 comments
by anonymous
Hello,

i have setup an openVPN server on ubuntu and want to connect the network on both sides to get access from the openVPN server to the embedded device connected to the TRB140 (192.168.2.130 for server side, 192.168.4.1 for TRB140 - Firmware version TRB1_R_00.07.00 and 10.8.0.0 is the VPN network adress).

The VPN is connected and I added a static route in my router from 10.8.0.0 subnet 255.255.255.0 to 192.168.2.130. In the openVPN server I have added <push "dhcp option DNS 192.168.2.1"> and also tried <push "dhcp option DNS 10.8.0.1"> .  I also tried <push "route 192.168.2.0 255.255.255.0"> in the openVPN server without success and removed it to get access to the TRB140 UI again.

In the TRB140 I have set the zone forwarding openvpn ⇒ lan to accept all and enabled ip masquerading.

I can ping google and my vpn server from the TRB140 but not from the devices connected to TRB140.

Already tried "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE"

Here is the TRB140 routing table :
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.8.0.1        128.0.0.0       UG    0      0        0 tun0
default         *               0.0.0.0         U     2      0        0 rmnet0
10.8.0.0        *               255.255.255.0   U     0      0        0 tun0
10.33.134.219   *               255.255.255.255 UH    2      0        0 rmnet0
128.0.0.0       10.8.0.1        128.0.0.0       UG    0      0        0 tun0
192.168.2.0     10.8.0.1        255.255.255.0   UG    0      0        0 tun0
192.168.4.0     *               255.255.255.0   U     1      0        0 br-lan
<static router ip>  *               255.255.255.255 UH    0      0        0 rmnet0

and the vpn server routing table:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         digitalisierung 0.0.0.0         UG    100    0        0 eno1
10.8.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun0
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 eno1
192.168.2.0     0.0.0.0         255.255.255.0   U     100    0        0 eno1
192.168.4.0     10.8.0.2        255.255.255.0   UG    0      0        0 tun0

Best regards

1 Answer

0 votes
by anonymous

Hello, 

Regarding the issue, you are having could you try re-flashing the firmware and also maybe this link will help.

OpenVPN server on Windows - Teltonika Networks Wiki (teltonika-networks.com)
Manual OpenVPN

As default when you are having when you are configuring a VPN tunnel when you put the CCD the remote device will be able to reach the server. But if your server is a PC may I know why you have different networks? Would it be possible to share a sketch of your topology?

Thanks

Regards,
Mellow