linux openvpn route add command failed [closed]
Asked Answered
N

1

6

I am trying to access my office vpn through their provided opvn file with my linux (ubuntu 14.04 LTS) laptop, but it is failing with following error:

Wed May  6 22:36:55 2015 /sbin/ip route add xxx.xxx.xxx.xxx/16 via yyy.yyy.yyy.yyy (actual ips hidden here)
RTNETLINK answers: Invalid argument
Wed May  6 22:36:55 2015 ERROR: Linux route add command failed: external program exited with error status: 2

The error repeats for many different ips.

It does work through our windows 7 computer so it must be some configuration issue on the linux machine. And I would like some help to fix this. I am running openvpn through the terminal with a script doing the following:

1) change nameserver to company nameserver (sudo sed -i "s:127.0.0.1:xx.xx.xx.xx:g"  /etc/resolv.conf
2) sudo openvpn --config /etc/openvpn/my_vpn_file.ovpn

I have been able to figure out that there probably somehow are multiple connections to the vpn..? So I guess the start would be to find and remove that/those other ones, but how? (I am not a complete novice in the linux world, but in the network/routing world - and stackoverflow!)

Thanks in advance!

Nies answered 6/5, 2015 at 21:18 Comment(2)
@Timur The full client log contains several ip adresses and domains that I guess I should not expose here.. so I have anonymized it. But it is also too long to post here.. ---Nies
Are you running multiple OpenVPN instances on the one server?Ezar
A
3

The problem is with your route command: /sbin/ip route add xxx.xxx.xxx.xxx/16 via yyy.yyy.yyy.yyy (actual ips hidden here) RTNETLINK answers: Invalid argument

Something about that is fishy -- but, lacking the IPs, I can't say what exactly. However, since you're using a /16, that means that these are private IPs (RFC 1918), which means they are meaningless for helping someone identify who you are, so I strongly recommend you edit your initial posting with the real IPs. I'm imagining there's overlap or something.

Anadem answered 14/9, 2016 at 22:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.