OpenVPN - ERROR: Linux route add command failed: external program exited with error status: 2
ERROR: Linux route add command failed: external program exited with error status: 2
What is the reason behind this error?
This error doesn't really mean much on its own. The exit code of 2 simply means the kernel rejected your route for some reason. It could be because you already have a route for that network, it could be because the gateway was not appropriate for the network/subnet, or many other things.
In any case bump up the verbosity you should be able to see more details about what specific route was failing.
Depending on the error you may need to fix your configuration, or just ignore the error. Sometimes the vpn server will offer routes, that your computer already has, or do not apply to your current connection.
Related videos on Youtube
talha06
Updated on September 18, 2022Comments
-
talha06 over 1 year
I'm using
OpenVPN
as my VPN server, and here is the content of auto-generated config file (.ovpn
) throughpfSense
control panel:dev tun persist-tun persist-key cipher AES-256-CBC auth SHA1 tls-client client resolv-retry infinite remote x.y.z.t 1194 udp verify-x509-name "VPN Server CA" name auth-user-pass pkcs12 pfSense-udp-1194-user1.p12 tls-auth pfSense-udp-1194-user1-tls.key 1 ns-cert-type server
I'm getting this error when I try to connect the server using the OpenVPN package (
OpenVPN 2.3.2 x86_64-pc-linux-gnu
) using the configuration above:ERROR: Linux route add command failed: external program exited with error status: 2
The structure of the directory I execute the command is like that:
. ├── pfSense-udp-1194-user1.ovpn ├── pfSense-udp-1194-user1.p12 └── pfSense-udp-1194-user1-tls.key
What is the reason behind this error?
My operating system is
Ubuntu 14.04 LTS (64-bit)
. -
talha06 over 7 yearsThanks for your reply, but do not have any issues with Windows client.
-
Zoredache over 7 yearsYes well that doesn't change my advice. Increase the 'verb'osity, and check your logs. More information should make the problem obvious.
-
L.A. Rabida about 2 yearsIncrease verbosity level: sudo openvpn --config connection.ovpn --verb 4