You are not logged in.

#1 2022-09-10 00:44:54

DragonOfWar
Member
Registered: 2021-10-16
Posts: 10

[SOLVED] Host server unreachable on VPN

I'm trying to remotely access a machine on my university through SSH. To do that, I have to connect to their VPN and then ssh into the machine with an IP address my instructor gave me. A while back (before august of this year), I was able to successfully access this machine without any problems. Though, after recess, I've been unable to ssh into the machine from my Arch Linux PC. So, I've tried to ping the server and it gave me 'Destination Host Unreachable'. I thought that the server would be at fault, but I tried to ping it through Windows, and also through my phone using OpenVPN's mobile app and a ping application, and both were able to reach the server successfully. After trial and error, I found out that I can connect to the server if I use USB Tethering with my phone and having the VPN active in both devices. The only problem is that I keep periodically losing internet connection, which is pretty annoying and I can't get my job done.
I use a USB WiFi adapter, as I don't have an Ethernet cable and I'm pretty far away from my router. So I suspected my WiFi adapter is the culprit, but it worked under Windows. I use the rtl8192eu-linux-driver, because my adapter didn't work with rtl8xxxu. I might not be able to downgrade to an older version without a kernel downgrade, because it broke because of kernel version Linux 5.19.2 and 6.0 and it got patched recently.
Any help would be appreciated.

Kernel: 5.19.7-arch1-1
WiFi Adapter: Intelbras IWA 3001
OpenVPN Version: 2.5.7

Last edited by DragonOfWar (2022-09-13 14:43:20)

Offline

#2 2022-09-10 15:42:20

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] Host server unreachable on VPN

Your other posts suggest you are using NetworkManager to manage your network connections ?

If so, are you using networkmanager-openvpn  ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2022-09-10 17:20:00

DragonOfWar
Member
Registered: 2021-10-16
Posts: 10

Re: [SOLVED] Host server unreachable on VPN

Lone_Wolf wrote:

Your other posts suggest you are using NetworkManager to manage your network connections ?

If so, are you using networkmanager-openvpn  ?

Indeed, I am using networkmanager-openvpn version 1.10.0-1. I have configured the VPN using KDE's GUI by importing the configuration file.
Here's what the 'nmcli' command prints out while I'm connected to the VPN:

[REDACTED] VPN connection
        master wlp7s0f3u2, VPN, ip4 default
        inet4 10.20.20.46/22
        route4 10.20.20.0/22 metric 50
        route4 10.20.20.0/22 via 10.20.20.1 metric 50
        route4 default via 10.20.20.1 metric 50
        inet6 [IPV6]/64
        route6 fe80::/64 metric 256

wlp7s0f3u2: connected to [REDACTED]
        "Realtek RTL8192EU"
        wifi (rtl8192eu), 80:8F:E8:BE:6B:34, hw, mtu 1500
        ip6 default
        inet4 192.168.0.34/24
        route4 192.168.0.0/24 metric 3003
        route4 default via 192.168.0.1 metric 3003
        route4 192.168.0.1/32 metric 50
        route4 [VPN_IP]/32 via 192.168.0.1 metric 50
        inet6 [MY IPV6]/128
        inet6 [SOME IPV6]/64
        inet6 [SOME IPV6]/64
        inet6 [SOME IPV6]/64
        route6 fe80::/64 metric 1024
        route6 [SOME IPV6]/64 metric 3003
        route6 default via [SOME IPV6] metric 3003
        route6 [SOME IPV6]/64 via [SOME IPV6] metric 600
        route6 default via [SOME IPV6] metric 600

tun0: connected (externally) to tun0
        "tun0"
        tun, sw, mtu 1500
        inet4 10.20.20.46/22
        route4 10.20.20.0/22 metric 50
        route4 10.20.20.0/22 via 10.20.20.1 metric 50
        route4 default via 10.20.20.1 metric 50
        inet6 [SOME IPV6]/64
        route6 fe80::/64 metric 256

p2p-dev-wlp7s0f3u2: disconnected
        "p2p-dev-wlp7s0f3u2"
        wifi-p2p, hw

Last edited by DragonOfWar (2022-09-11 18:11:52)

Offline

#4 2022-09-11 08:32:22

-thc
Member
Registered: 2017-03-15
Posts: 485

Re: [SOLVED] Host server unreachable on VPN

You mentioned Windows - if you have a dual boot PC (Arch/Windows) please disable Fast-Boot in Windows.

If that's not an issue, please post the results of:

ping -c 4 10.20.20.1
ping -c 4 8.8.8.8
ping -c 4 dns.google

while connected to your VPN.

Please note that posting your non-redacted public IPv4/IPv6 addresses expose your approximate location, your provider and your university.

Offline

#5 2022-09-11 18:08:54

DragonOfWar
Member
Registered: 2021-10-16
Posts: 10

Re: [SOLVED] Host server unreachable on VPN

-thc wrote:

You mentioned Windows - if you have a dual boot PC (Arch/Windows) please disable Fast-Boot in Windows.

If that's not an issue, please post the results of:

ping -c 4 10.20.20.1
ping -c 4 8.8.8.8
ping -c 4 dns.google

while connected to your VPN.

Please note that posting your non-redacted public IPv4/IPv6 addresses expose your approximate location, your provider and your university.

Fast-Boot (as well as secure boot) are disabled. I ran those 3 commands, while VPN was turned on and off, both on Windows and on Linux, just for sake of comparison. Here's what I got

Linux - VPN ON

$ ping -c 4 10.20.20.1
PING 10.20.20.1 (10.20.20.1) 56(84) bytes of data.
64 bytes from 10.20.20.1: icmp_seq=1 ttl=64 time=73.3 ms
64 bytes from 10.20.20.1: icmp_seq=2 ttl=64 time=31.5 ms
64 bytes from 10.20.20.1: icmp_seq=3 ttl=64 time=32.8 ms
64 bytes from 10.20.20.1: icmp_seq=4 ttl=64 time=31.0 ms

--- 10.20.20.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 31.002/42.146/73.291/17.993 ms

$ ping -c 4 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=111 time=49.7 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=111 time=161 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=111 time=181 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=111 time=47.8 ms

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 47.780/109.906/180.972/61.560 ms

$ ping -c 4 dns.google
PING dns.google(dns.google (2001:4860:4860::8888)) 56 data bytes
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=1 ttl=113 time=20.4 ms
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=2 ttl=113 time=20.3 ms
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=3 ttl=113 time=23.1 ms
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=4 ttl=113 time=21.0 ms

--- dns.google ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 20.266/21.172/23.059/1.119 ms

Linux - VPN OFF

$ ping -c 4 10.20.20.1
PING 10.20.20.1 (10.20.20.1) 56(84) bytes of data.

--- 10.20.20.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3048ms

$ ping -c 4 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=61.1 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=33.0 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=91.8 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=34.5 ms

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 32.981/55.094/91.829/23.974 ms

$ ping -c 4 dns.google
PING dns.google(dns.google (2001:4860:4860::8888)) 56 data bytes
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=1 ttl=113 time=19.7 ms
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=2 ttl=113 time=20.4 ms
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=3 ttl=113 time=20.3 ms
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=4 ttl=113 time=45.8 ms

--- dns.google ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 19.677/26.544/45.830/11.137 ms

Windows - VPN ON

ping -n 4 10.20.20.1

Pinging 10.20.20.1 with 32 bytes of data:
Reply from 10.20.20.1: bytes=32 time=868ms TTL=64
Reply from 10.20.20.1: bytes=32 time=1226ms TTL=64
Reply from 10.20.20.1: bytes=32 time=764ms TTL=64
Reply from 10.20.20.1: bytes=32 time=618ms TTL=64

Ping statistics for 10.20.20.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 618ms, Maximum = 1226ms, Average = 869ms


ping -n 4 8.8.8.8

Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=1873ms TTL=111
Reply from 8.8.8.8: bytes=32 time=2957ms TTL=111
Reply from 8.8.8.8: bytes=32 time=1788ms TTL=111
Reply from 8.8.8.8: bytes=32 time=1661ms TTL=111

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1661ms, Maximum = 2957ms, Average = 2069ms

ping -n 4 dns.google

Pinging dns.google [8.8.8.8] with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=1413ms TTL=111
Request timed out.
Reply from 8.8.8.8: bytes=32 time=1255ms TTL=111
Reply from 8.8.8.8: bytes=32 time=407ms TTL=111

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 407ms, Maximum = 1413ms, Average = 1025ms

Windows - VPN OFF

ping -n 4 10.20.20.1

Pinging 10.20.20.1 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 10.20.20.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),


ping -n 4 8.8.8.8

Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=229ms TTL=55
Reply from 8.8.8.8: bytes=32 time=924ms TTL=55
Reply from 8.8.8.8: bytes=32 time=733ms TTL=55
Reply from 8.8.8.8: bytes=32 time=1067ms TTL=55

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 229ms, Maximum = 1067ms, Average = 738ms


ping -n 4 dns.google

Pinging dns.google [2001:4860:4860::8844] with 32 bytes of data:
Reply from 2001:4860:4860::8844: time=1588ms
Reply from 2001:4860:4860::8844: time=1009ms
Reply from 2001:4860:4860::8844: time=1294ms
Reply from 2001:4860:4860::8844: time=502ms

Ping statistics for 2001:4860:4860::8844:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 502ms, Maximum = 1588ms, Average = 1098ms

Offline

#6 2022-09-11 18:35:00

-thc
Member
Registered: 2017-03-15
Posts: 485

Re: [SOLVED] Host server unreachable on VPN

Everything looks like it should.

Can you ping other hosts inside the university's network?

Offline

#7 2022-09-11 18:46:11

DragonOfWar
Member
Registered: 2021-10-16
Posts: 10

Re: [SOLVED] Host server unreachable on VPN

-thc wrote:

Everything looks like it should.

Can you ping other hosts inside the university's network?

I'm unaware of any other hosts on the university's network.
Though I've attempted coming up with another IP address that's close to the one I'm trying to access, and I've tried pinging it with my phone and it probably is present in my university's network (It successfully pinged only when I'm connected to the VPN). So I've tried pinging it through Linux while the VPN is active, and it also was unreachable.
So I suppose that I'm also unable to access other hosts.

Last edited by DragonOfWar (2022-09-11 18:50:20)

Offline

#8 2022-09-12 06:35:43

-thc
Member
Registered: 2017-03-15
Posts: 485

Re: [SOLVED] Host server unreachable on VPN

I'm a little stumped here. Your OpenVPN connection is set up to work as a default gateway and it looks like its working correctly.

Is the IP address of your campus SSH machine an IPv4 address (w.x.y.z)?

Offline

#9 2022-09-12 22:22:01

DragonOfWar
Member
Registered: 2021-10-16
Posts: 10

Re: [SOLVED] Host server unreachable on VPN

-thc wrote:

I'm a little stumped here. Your OpenVPN connection is set up to work as a default gateway and it looks like its working correctly.

Is the IP address of your campus SSH machine an IPv4 address (w.x.y.z)?

No problem! I'm also confused.

Yes, the IP address is an IPv4 in the format 192.168.x.x.

I was fiddling around with using USB Tethering and apparently I don't need to have the VPN active on my phone, only on PC. This greatly reduced the disconnections I was experiencing before and I was able to SSH to the machine without issues.
It would be nice to have it working without using USB Tethering but this will work for now.

Thanks!

Offline

#10 2022-09-13 04:59:00

-thc
Member
Registered: 2017-03-15
Posts: 485

Re: [SOLVED] Host server unreachable on VPN

Last question: Is the IPv4 address of your campus SSH machine in the 192.168.0.x range?

Offline

#11 2022-09-13 12:53:12

DragonOfWar
Member
Registered: 2021-10-16
Posts: 10

Re: [SOLVED] Host server unreachable on VPN

-thc wrote:

Last question: Is the IPv4 address of your campus SSH machine in the 192.168.0.x range?

Yes it is!

Offline

#12 2022-09-13 13:58:01

-thc
Member
Registered: 2017-03-15
Posts: 485

Re: [SOLVED] Host server unreachable on VPN

Did you realize that your home network has the same IPv4 range (192.168.0.x)?

This leads to conflicts whenever you try to reach an "on-campus" IPv4 address that is also in use in your home network.
Your connection attempts will be routed to that local device instead.

Offline

#13 2022-09-13 14:41:14

DragonOfWar
Member
Registered: 2021-10-16
Posts: 10

Re: [SOLVED] Host server unreachable on VPN

-thc wrote:

Did you realize that your home network has the same IPv4 range (192.168.0.x)?

This leads to conflicts whenever you try to reach an "on-campus" IPv4 address that is also in use in your home network.
Your connection attempts will be routed to that local device instead.

Well, that might just be it. I routed the IP address to go through the VPN interface:

$ sudo ip route add [SSH server IP address] dev tun0

And it worked! Thanks!

Last edited by DragonOfWar (2022-09-13 14:43:01)

Offline

Board footer

Powered by FluxBB