I just cannot get OpenVPN to work. Cane someone please help as I have spent days on this. I have reinstalled Ubuntu and have even moved the virtual server to another data centre.
All installed ok. But I always get these errors in the logs
2024-01-25 00:41:48 net_route_v4_add: 173.239.199.183/32 via 169.254.0.1 dev [NULL] table 0 metric -1
2024-01-25 00:41:48 sitnl_send: rtnl: generic error (-101): Network is unreachable
ERROR: Linux route add command failed
and then I have no outward network connectivity.
Cannot even ping 8.8.8.8
So I tend to think it has something to do with my Ubuntu network config. It is the basic one that is supplied by the hosting provider Hostinger.
The server has a fixed IP address but the default gateway has a strange IP address like an APIPA one on a different subnet.
Would this stop a VPN from working?
Here are the full logs...
TIA
This is the log file....
2024-01-25 00:41:45 WARNING: file '/VPN/credentials.txt' is group or others accessible
2024-01-25 00:41:45 OpenVPN 2.5.9 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 29 2023
2024-01-25 00:41:45 library versions: OpenSSL 3.0.2 15 Mar 2022, LZO 2.10
2024-01-25 00:41:45 WARNING: --ns-cert-type is DEPRECATED. Use --remote-cert-tls instead.
2024-01-25 00:41:45 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2024-01-25 00:41:45 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
2024-01-25 00:41:45 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
2024-01-25 00:41:45 TCP/UDP: Preserving recently used remote address: [AF_INET]173.239.199.183:1195
2024-01-25 00:41:45 Socket Buffers: R=[212992->425984] S=[212992->425984]
2024-01-25 00:41:45 UDP link local: (not bound)
2024-01-25 00:41:45 UDP link remote: [AF_INET]173.239.199.183:1195
2024-01-25 00:41:45 TLS: Initial packet from [AF_INET]173.239.199.183:1195, sid=f45c902d ff70cbd5
2024-01-25 00:41:45 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2024-01-25 00:41:45 VERIFY OK: depth=1, C=VG, ST=BVI, O=ExpressVPN, OU=ExpressVPN, CN=ExpressVPN CA, emailAddress=support@expressvpn.com
2024-01-25 00:41:45 VERIFY OK: nsCertType=SERVER
2024-01-25 00:41:45 VERIFY X509NAME OK: C=VG, ST=BVI, O=ExpressVPN, OU=ExpressVPN, CN=Server-10830-0a, emailAddress=support@expressvpn.com
2024-01-25 00:41:45 VERIFY OK: depth=0, C=VG, ST=BVI, O=ExpressVPN, OU=ExpressVPN, CN=Server-10830-0a, emailAddress=support@expressvpn.com
2024-01-25 00:41:45 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1554', remote='link-mtu 1606'
2024-01-25 00:41:45 WARNING: 'auth' is used inconsistently, local='auth [null-digest]', remote='auth SHA512'
2024-01-25 00:41:45 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 2048 bit RSA, signature: RSA-SHA256
2024-01-25 00:41:45 [Server-10830-0a] Peer Connection Initiated with [AF_INET]173.239.199.183:1195
2024-01-25 00:41:46 SENT CONTROL [Server-10830-0a]: 'PUSH_REQUEST' (status=1)
2024-01-25 00:41:46 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 10.39.0.1,comp-lzo no,route 10.39.0.1,topology net30,ping 10,ping-restart 60,ifconfig 10.39.3.14 10.39.3.13,peer-id 31,cipher AES-256-GCM'
2024-01-25 00:41:46 OPTIONS IMPORT: timers and/or timeouts modified
2024-01-25 00:41:46 OPTIONS IMPORT: compression parms modified
2024-01-25 00:41:46 OPTIONS IMPORT: --ifconfig/up options modified
2024-01-25 00:41:46 OPTIONS IMPORT: route options modified
2024-01-25 00:41:46 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2024-01-25 00:41:46 OPTIONS IMPORT: peer-id set
2024-01-25 00:41:46 OPTIONS IMPORT: adjusting link_mtu to 1629
2024-01-25 00:41:46 OPTIONS IMPORT: data channel crypto options modified
2024-01-25 00:41:46 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2024-01-25 00:41:46 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2024-01-25 00:41:46 net_route_v4_best_gw query: dst 0.0.0.0
2024-01-25 00:41:46 net_route_v4_best_gw result: via 169.254.0.1 dev eth0
2024-01-25 00:41:46 ROUTE_GATEWAY 169.254.0.1
2024-01-25 00:41:46 TUN/TAP device tun0 opened
2024-01-25 00:41:46 net_iface_mtu_set: mtu 1500 for tun0
2024-01-25 00:41:46 net_iface_up: set tun0 up
2024-01-25 00:41:46 net_addr_ptp_v4_add: 10.39.3.14 peer 10.39.3.13 dev tun0
2024-01-25 00:41:46 /etc/openvpn/update-systemd-resolved tun0 1500 1629 10.39.3.14 10.39.3.13 init
<14>Jan 25 00:41:46 update-systemd-resolved: Link 'tun0' coming up
<14>Jan 25 00:41:46 update-systemd-resolved: Adding DNS Routed Domain .
<14>Jan 25 00:41:46 update-systemd-resolved: Adding IPv4 DNS Server 10.39.0.1
<14>Jan 25 00:41:46 update-systemd-resolved: SetLinkDNS(3 1 2 4 10 39 0 1)
<14>Jan 25 00:41:46 update-systemd-resolved: SetLinkDomains(3 1 . true)
2024-01-25 00:41:48 net_route_v4_add: 173.239.199.183/32 via 169.254.0.1 dev [NULL] table 0 metric -1
2024-01-25 00:41:48 sitnl_send: rtnl: generic error (-101): Network is unreachable
2024-01-25 00:41:48 ERROR: Linux route add command failed
2024-01-25 00:41:48 net_route_v4_add: 0.0.0.0/1 via 10.39.3.13 dev [NULL] table 0 metric -1
2024-01-25 00:41:48 net_route_v4_add: 128.0.0.0/1 via 10.39.3.13 dev [NULL] table 0 metric -1
2024-01-25 00:41:48 net_route_v4_add: 10.39.0.1/32 via 10.39.3.13 dev [NULL] table 0 metric -1
2024-01-25 00:41:48 Initialization Sequence Completed
ERROR: Linux route add command failed
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 2
- Joined: Thu Jan 25, 2024 2:07 pm
-
- OpenVpn Newbie
- Posts: 1
- Joined: Thu Jan 02, 2025 11:06 pm
Re: ERROR: Linux route add command failed
I just did a upgrade to ubuntu 24.04 today and get the same error. Same config worked on Ubuntu 22.04.
Clean install, nothing changed from defaults.
Routes are not added.
2025-01-02 23:56:50 us=511935 PUSH: Received control message: 'PUSH_REPLY,route 192.168.1.0 255.255.255.0,route 192.168.5.0 255.255.255.0,route 10.8.0.0 255.255.255.0,route 10.8.2.0 255.255.255.0,dhcp-option DNS 192.168.1.1,route-gateway 10.8.1.1,topology subnet,ping 60,ping-restart 120,ifconfig 10.8.2.2 255.255.255.0,peer-id 1,cipher AES-256-GCM'
2025-01-02 23:56:50 us=512224 OPTIONS IMPORT: --ifconfig/up options modified
2025-01-02 23:56:50 us=512276 OPTIONS IMPORT: route options modified
2025-01-02 23:56:50 us=512321 OPTIONS IMPORT: route-related options modified
2025-01-02 23:56:50 us=512360 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2025-01-02 23:56:50 us=512505 net_route_v4_best_gw query: dst 0.0.0.0
2025-01-02 23:56:50 us=512855 net_route_v4_best_gw result: via 192.168.10.1 dev eno1
2025-01-02 23:56:50 us=513027 ROUTE_GATEWAY 192.168.10.1/255.255.255.0 IFACE=eno1 HWADDR=e0:db:55:e6:01:7b
2025-01-02 23:56:50 us=513769 TUN/TAP device tun0 opened
2025-01-02 23:56:50 us=513824 do_ifconfig, ipv4=1, ipv6=0
2025-01-02 23:56:50 us=513897 net_iface_mtu_set: mtu 1500 for tun0
2025-01-02 23:56:50 us=514028 net_iface_up: set tun0 up
2025-01-02 23:56:50 us=514404 net_addr_v4_add: 10.8.2.2/24 dev tun0
2025-01-02 23:56:50 us=514735 net_route_v4_add: 192.168.1.0/24 via 10.8.1.1 dev [NULL] table 0 metric -1
2025-01-02 23:56:50 us=514936 sitnl_send: rtnl: generic error (-101): Network is unreachable
2025-01-02 23:56:50 us=514998 ERROR: Linux route add command failed
2025-01-02 23:56:50 us=515036 net_route_v4_add: 192.168.5.0/24 via 10.8.1.1 dev [NULL] table 0 metric -1
2025-01-02 23:56:50 us=515154 sitnl_send: rtnl: generic error (-101): Network is unreachable
2025-01-02 23:56:50 us=515207 ERROR: Linux route add command failed
2025-01-02 23:56:50 us=515252 net_route_v4_add: 10.8.0.0/24 via 10.8.1.1 dev [NULL] table 0 metric -1
2025-01-02 23:56:50 us=515353 sitnl_send: rtnl: generic error (-101): Network is unreachable
2025-01-02 23:56:50 us=515424 ERROR: Linux route add command failed
2025-01-02 23:56:50 us=515463 net_route_v4_add: 10.8.2.0/24 via 10.8.1.1 dev [NULL] table 0 metric -1
2025-01-02 23:56:50 us=515556 sitnl_send: rtnl: generic error (-101): Network is unreachable
2025-01-02 23:56:50 us=515600 ERROR: Linux route add command failed
2025-01-02 23:56:50 us=515692 Data Channel MTU parms [ mss_fix:1399 max_frag:0 tun_mtu:1500 tun_max_mtu:1600 headroom:136 payload:1768 tailroom:562 ET:0 ]
2025-01-02 23:56:50 us=516452 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2025-01-02 23:56:50 us=516532 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2025-01-02 23:56:50 us=516586 Initialization Sequence Completed
2025-01-02 23:56:50 us=516633 Data Channel: cipher 'AES-256-GCM', peer-id: 1, compression: 'lzo'
2025-01-02 23:56:50 us=516668 Timers: ping 60, ping-restart 120
Clean install, nothing changed from defaults.
Routes are not added.
2025-01-02 23:56:50 us=511935 PUSH: Received control message: 'PUSH_REPLY,route 192.168.1.0 255.255.255.0,route 192.168.5.0 255.255.255.0,route 10.8.0.0 255.255.255.0,route 10.8.2.0 255.255.255.0,dhcp-option DNS 192.168.1.1,route-gateway 10.8.1.1,topology subnet,ping 60,ping-restart 120,ifconfig 10.8.2.2 255.255.255.0,peer-id 1,cipher AES-256-GCM'
2025-01-02 23:56:50 us=512224 OPTIONS IMPORT: --ifconfig/up options modified
2025-01-02 23:56:50 us=512276 OPTIONS IMPORT: route options modified
2025-01-02 23:56:50 us=512321 OPTIONS IMPORT: route-related options modified
2025-01-02 23:56:50 us=512360 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2025-01-02 23:56:50 us=512505 net_route_v4_best_gw query: dst 0.0.0.0
2025-01-02 23:56:50 us=512855 net_route_v4_best_gw result: via 192.168.10.1 dev eno1
2025-01-02 23:56:50 us=513027 ROUTE_GATEWAY 192.168.10.1/255.255.255.0 IFACE=eno1 HWADDR=e0:db:55:e6:01:7b
2025-01-02 23:56:50 us=513769 TUN/TAP device tun0 opened
2025-01-02 23:56:50 us=513824 do_ifconfig, ipv4=1, ipv6=0
2025-01-02 23:56:50 us=513897 net_iface_mtu_set: mtu 1500 for tun0
2025-01-02 23:56:50 us=514028 net_iface_up: set tun0 up
2025-01-02 23:56:50 us=514404 net_addr_v4_add: 10.8.2.2/24 dev tun0
2025-01-02 23:56:50 us=514735 net_route_v4_add: 192.168.1.0/24 via 10.8.1.1 dev [NULL] table 0 metric -1
2025-01-02 23:56:50 us=514936 sitnl_send: rtnl: generic error (-101): Network is unreachable
2025-01-02 23:56:50 us=514998 ERROR: Linux route add command failed
2025-01-02 23:56:50 us=515036 net_route_v4_add: 192.168.5.0/24 via 10.8.1.1 dev [NULL] table 0 metric -1
2025-01-02 23:56:50 us=515154 sitnl_send: rtnl: generic error (-101): Network is unreachable
2025-01-02 23:56:50 us=515207 ERROR: Linux route add command failed
2025-01-02 23:56:50 us=515252 net_route_v4_add: 10.8.0.0/24 via 10.8.1.1 dev [NULL] table 0 metric -1
2025-01-02 23:56:50 us=515353 sitnl_send: rtnl: generic error (-101): Network is unreachable
2025-01-02 23:56:50 us=515424 ERROR: Linux route add command failed
2025-01-02 23:56:50 us=515463 net_route_v4_add: 10.8.2.0/24 via 10.8.1.1 dev [NULL] table 0 metric -1
2025-01-02 23:56:50 us=515556 sitnl_send: rtnl: generic error (-101): Network is unreachable
2025-01-02 23:56:50 us=515600 ERROR: Linux route add command failed
2025-01-02 23:56:50 us=515692 Data Channel MTU parms [ mss_fix:1399 max_frag:0 tun_mtu:1500 tun_max_mtu:1600 headroom:136 payload:1768 tailroom:562 ET:0 ]
2025-01-02 23:56:50 us=516452 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2025-01-02 23:56:50 us=516532 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2025-01-02 23:56:50 us=516586 Initialization Sequence Completed
2025-01-02 23:56:50 us=516633 Data Channel: cipher 'AES-256-GCM', peer-id: 1, compression: 'lzo'
2025-01-02 23:56:50 us=516668 Timers: ping 60, ping-restart 120
-
- OpenVpn Newbie
- Posts: 3
- Joined: Wed Jan 08, 2025 11:47 am
Re: ERROR: Linux route add command failed
The OpenVPN connection on your Ubuntu server fails due to a routing issue. The server attempts to add a route with an invalid gateway (169.254.0.1), likely caused by your unusual nj.gov/mvc default gateway. This disrupts network connectivity. Contact Hostinger support to resolve the routing issue or investigate and manually add the correct routes, but proceed with caution.