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
390 views 0 comments
by anonymous

Dear Community,
I haven't found other with my setup (PIHOLE DNS + PIVPN Server, RUT240 Client)

my home network provides the openvpn server inside a pi-hole dns adblocker with own dns resolving with dnscrypt proxy etc. and PiVPN installed on top of it. this does work flawless. with client certificates password-salted generated, I'm able to connet my mobile phones to the vpn and get dns resolving, adblocking etc. so I guess that my setup on my openvpn Server is correct.

however, the RUT240 as client does not work, it connects, but it does not get dns resolving and internet access.
rut240 has a different LAN area of 192.168.10.x to my home network, everything else is factory default,
VPN client profile has a -nopass option (as it is stated in the openvpn documentation of pivpn.io).

the Rut240 states that it is connect when I setup a client vpn mode and use the config file provided from my pivpn server.

SERVER shows:

client status list gives me the virtual ip it has been given inside my openvpn server pivpn -c:

pivpn -d gives me

Jul 26 16:40:09 raspberrypi ovpn-server[21495]: Rut240_AP/REDACTED:7966 SENT CONTROL [Rut240_AP]: 'PUSH_REPLY,dhcp-option DOMAIN xxxxxxxx.xxxxxxxxx.xxx,dhcp-option DNS 10.218.161.1,block-outside-dns,redirect-gateway def1,route-gateway 10.218.161.1,topology subnet,ping 15,ping-restart 120,ifconfig 10.218.161.3 255.255.255.0,peer-id 0,cipher AES-256-GCM' (status=1)

pihole shows a list of clients in my network, mobile phones connected with openvpn show up in this list with specific virtual vpn ip-address, RUT240 does not!

CLIENT RUT240

I'm able to open the pihole admin user interface on the pihole openvpn server when RUT240 is connected!
however, when I try to open a webpage on the laptop (any client connected to the rut240), it is not resolved. so there is no internet connection.

In addition, i dont know what remote ip adress is shown inside the client status list (screenshot above) and the teltonika rut configuration site does now show any ip adress

routing table teltonika rut240 shows various stuff that I want to upload.

I'm not allowed to add any screenshots to this posting?

1 Answer

0 votes
by anonymous

Hello, I didn’t really understand why there were several identical screenshots and a hundred tried to show them. Please show the contents of the OpenVPN configuration file.

On the RUT240, run the ifconfig command to see all interfaces on the device. There you will see the IP assigned to the device in the VPN tunnel, since it is not clear from your screenshots which ip is given to the router. On one screenshot it's 10.218.161.2, and on the other it's 10.218.161.3. In the text, you indicated that ip is assigned to 10.218.161.3.

Ping to your server's ip. If the answers come, then the VPN is active and the tunnel is working. (most likely it is)

Run the route -n command to see all active routes. In the screenshot, you can see that there are two routing tables main and 1. By default, only main is present on the device. What is the duplicate table for?

Run traceroute 8.8.8.8 and if the first hop is your server's ip, then the traffic is going through the tunnel.

Do a traceroute google.com to see if DNS is working or not.

The list of active DNS can be seen in the file /tmp/resolv.conf.d/resolv.conf.auto you can download and view it with any text editor or run the command: cat /tmp/resolv.conf.d/resolv.conf.auto

Based on this, then it will be possible to understand at what step you have a problem.

Best regards, Anton