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.
+1 vote
328 views 12 comments
by anonymous
I'm hoping that i can get some assistance with this issue. I have the following setup using 2 x TRB140 gateways.
I have a PC connected to a TRB140 Gateway and onto the mobile network.
I have a 2nd PC running VMWare Workstation connected to a 2nd TRB140 Gateway and onto the mobile network.
I have 2 x Virtual Machines (VMs) running on the 2nd PC, VM1 is a Windows 2022 Server running DNS, VM2 is running CentOS (Linux)
The 2nd PC can connect to the first PC using RMS.
I have created an OpenVPN connection between the 2nd PC (running the OpenVPN server) and the 1st PC running the OpenVPN client which seems fine.
I need the 1st PC to be able to query the DNS Server (VM1) running on the 2nd PC through the VPN tunnel

My end goal is that I'd like the 1st and 2nd PCs to talk to each other as if they are both on the same lan segment  subnet using the same IP address range even though they are talking via the mobile network..

Is this even possible?

Any assistance would be greatly appreciated.

Regards

i have tried the configuration according to guide you linked still having problems with openvpn connection disconnecting and reconnection at what appear be random intervals attached troubleshooting file from each if are able get any indications as to the problem with them
by anonymous

Here is the picture.

1 Answer

0 votes
by anonymous

Hello,

My end goal is that I'd like the 1st and 2nd PCs to talk to each other as if they are both on the same lan segment  subnet using the same IP address range even though they are talking via the mobile network..

This sounds like You should be using OpenVPN in TAP mode, which operates on the second layer. More information about it can be found here. Since this tunnel would be configured on your PCs, and not the routers, I will not be able to help much in the configuration department, however, it should be quite straightforward. This way the server and the clients will be in the same subnet.

In the future, it is planned that RMS VPN Hubs will also support OpenVPN TAP mode, however for now, only TUN is supported.

If you experience any issues with the TAP mode, it would also be possible to achieve your setup with only the RMS tunnel. Simply add the routes in the RMS VPN configuration to both devices' LAN networks, enable LAN forwarding on them both (make sure their LAN networks do not overlap!), and the clients of 1st TRB LAN should be able to reach the clients of the 2nd TRB LAN, including the DNS server.

Hope this helps!

Best regards,
Daumantas G.

by anonymous
Than you Daumantas for your prompt reply and explanation. I will try your suggestions and report back.

Regards
by anonymous
Hello,

Sure, let us know how it goes!

Best regards,
DaumantasG
by anonymous
Hi Daumantas, So I’m letting you know how it went.

We managed to setup OpenVPN server on the PC1 hosting the DNS server VM and connect through to PC2 with Win10.

Setup the routes in RMS as you described and with a bit of fiddling about and can now ping a hostname in the local DNS from PC2 to PC1.

The issue now is maintaining the OpenVPN connection it stays up for about 15 pings then drops the connections this continues indefinitely.

Did some googling and modified the MTU based on the OpenVPN testing to establish the optimal MTU value to no avail.

So, we have either mis-configured the OpenVPN and / or the RMS or there is something else weird going on.

Do you have a sample /example configuration you can share?

Thanks in advance…

Derek
by anonymous

Hello,

  

Configuration examples for RMS VPN Hubs can be found here.

I will also ask you to replicate the issue a few times (wait for the VPN connection to drop out and reestablish), then in the TRB140 navigate to System → Administration → Troubleshoot and generate a troubleshoot file. This file can be attached to the original question and will only be visible to Teltonika moderators.

Also, make sure the subnets on both sides of the VPN, as well as the virtual tunnel, do not overlap. Make sure the time is set correctly on all devices involved.

  

Best regards,
DaumantasG

by anonymous

Hello, I have been working on this with Derek and have had the two troubleshooting files uploaded to the original question. I have tried the configuration according to guide you linked but unfortunately I am still having problems with the openvpn connection disconnecting and reconnection at what appear be random intervals. I have attached troubleshooting file from each if you are able get any indications as to the problem with them I would be very appreciative. It would seem to be the VPM itself.

Thank you

Andy

by anonymous

Hello,

  

From the logs, it seems that the server performs an inactivity restart:

Inactivity timeout (--ping-restart), restarting

This is most likely caused by, well, inactivity. Does it impact the user experience? The tunnel seems to be restarting in around 4-5 seconds.

If this actually impacts the experience, then this is an issue. However, if it does not, and you only noticed it disconnecting and reconnecting, then I believe it is the intended behavior.

Awaiting your response!

    

Best regards,
DaumantasG

by anonymous
Hi DaumantasG

I have it on a constant ping between the two endpoints. I'm not sure if ICMP traffic is enough for it to stay active. The drop outs are at random time intervals and it never stays connected for more than a few seconds.

The plan for this would be to use approx 60 TRB140's to connect 60 Windows 10 PC's to a DNS server from around the state to run a web based control server for the Win10 PC's.

Thank you

Andy
by anonymous
Hello,

  

Just to clarify, .ovpn files are not used anywhere at the moment, all of the clients are the TRBs, correct?

Multiple clients using the same certificate could exhibit the same behavior, so make sure different clients are configured in RMS for each device. This could also indicate route-clashing or similar network issues, however, without having your exact topology layout I will not be able to identify these conflict points.

If that does not help, perhaps you could try deleting the VPN hub and re-adding all of the devices? I will also ask you to attach a screenshot of the Routes section of the VPN hub to your original question. It will only be visible to Teltonika moderators.

  

Best regards,
DaumantasG
by anonymous
Hi

.ovpn files are installed. My mistake was using the same client for each device. I have now generated a Custom client for each device and now have constant ping connectivity with no dropouts. The routes screenshot is attached above. Thank you.

Andy
by anonymous
They are both TRB140's. Now need to get the OpenVPN connection running on the CentOS VM.

Andy
by anonymous
Hello,

Great to hear that the issue was solved.

Connecting on the CentOS should be as simple as installing the OpenVPN client and uploading the file from RMS. Once again, different clients need to be generated in RMS for each connection.

Best regards,
DaumantasG