Context
There’s a VPN server where only a single machine I own is allowed to connect. Let’s call this the machine A.
This VPN doesn’t function as I expected. It, for example, doesn’t create a new network device (tun or tap) or change the routing rules.
> route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 600 0 0 wlo1
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 wlo1
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlo1
To allow multiple machines to use this VPN, I tried to install an OpenVPN server on machine A and connect to it on the machine B through the local network. My plan was to route all network traffic from B through A.
Both machines’ IPs are reserved in the local network, so they don’t change.
The problem
For some reason, this setup didn’t work. I tried debugging using traceroute and found out that the IPs being used are different in each one.
traceroute in machine A
> traceroute site-accessible-through-vpn
traceroute to site-accessible-through-vpn (100.64.0.1), 30 hops max, 60 byte packets
-- just a bunch of * * * --
traceroute in machine B without my OpenVPN server connected
> traceroute site-accessible-through-vpn
traceroute to site-accessible-through-vpn (111.111.111.111), 30 hops max, 60 byte packets
1 _gateway (192.168.1.1) 0.367 ms 0.352 ms 0.455 ms <= my router
2 192.168.15.1 (192.168.15.1) 2.227 ms 2.139 ms 2.287 ms <= my ISP modem
3 * * *
4 * * *
5 187-100-57-95.dsl.telesp.net.br (187.100.57.95) 7.155 ms 7.236 ms 7.297 ms
6 * * *
7 * * *
8 111.111.111.111 (111.111.111.111) 4.433 ms 4.727 ms 8.773 ms
192.168.1.1
is my router’s IP address192.168.15.1
is my ISP modem’s IP address
traceroute in machine B with my OpenVPN server connected
> traceroute site-accessible-through-vpn
traceroute to site-accessible-through-vpn (111.111.111.111), 30 hops max, 60 byte packets
1 10.8.0.1 (10.8.0.1) 50.939 ms 50.926 ms 50.917 ms
2 _gateway (192.168.1.1) 52.538 ms 52.287 ms 52.490 ms
3 192.168.15.1 (192.168.15.1) 52.494 ms 52.678 ms 52.473 ms
4 * * *
5 * 201-1-224-16.dsl.telesp.net.br (201.1.224.16) 230.319 ms 230.315 ms
6 187-100-57-89.dsl.telesp.net.br (187.100.57.89) 230.137 ms 187-100-57-95.dsl.telesp.net.br (187.100.57.95) 33.937 ms 187-100-57-89.dsl.telesp.net.br (187.100.57.89) 33.923 ms
7 * * *
8 * * *
9 111.111.111.111 (111.111.111.111) 10.903 ms 11.650 ms 11.177 ms
There’s an additional hop to 10.8.0.1
. This is the server of the local OpenVPN server, machine A.
First thing I noticed is the destination IP is different. The VPN server on machine A is redirecting the traffic to this address, instead of the one in machine B. It might imply, then, there’s a different DNS server being used to resolve the names.
If I disable the VPN connection (not the OpenVPN server I created, the first one) on machine A, the traceroute starts to look like the one on machine B.
Also, if I run a speed test on machine B, I can see a high network usage on machine A, showing the traffic is being redirected correctly.
The help I need
As my networking skills are far from good, I have no idea what I can do to make this work, so I came here to see if someone does.
I don’t know if it’s a DNS issue or if there’re additional settings I have to do.
Thank you very much for the help