Page 1 of 1

ERROR: Linux route add command failed: external program exited with error status: 2

Posted: Wed May 16, 2018 4:06 pm
by Anna Gz
Hello community.
I'm having an error connecting from the client machine.

Code: Select all

RTNETLINK answers: File exists
Tue May 15 23:45:19 2018 ERROR: Linux route add command failed: external program exited with error status: 2
server.conf

Code: Select all

port 16122
proto udp
dev tun
sndbuf 0
rcvbuf 0
ca ca.crt
cert server.crt
key server.key  # This file should be kept secret
dh dh2048.pem
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
keepalive 10 120
tls-auth ta.key 0 # This file is secret
key-direction 0
cipher AES-256-CBC   # AES
auth SHA512
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn-status.log
log /var/log/openvpn.log
verb 3
mssfix 0
client.conf

Code: Select all

client
dev tun
proto udp
sndbuf 0
rcvbuf 0
remote xxx.xx.xx.xx 16122
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
remote-cert-tls server
key-direction 1
cipher AES-256-CBC
auth SHA512
comp-lzo
verb 3
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
Output of the "route" command on the client while using vpn

Code: Select all

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.8.0.1        128.0.0.0       UG    0      0        0 tun0
default         gateway         0.0.0.0         UG    600    0        0 wlp3s0
10.8.0.0        *               255.255.255.0   U     0      0        0 tun0
128.0.0.0       10.8.0.1        128.0.0.0       UG    0      0        0 tun0
link-local      *               255.255.0.0     U     1000   0        0 wlp3s0
185.141.27.87   gateway         255.255.255.255 UGH   0      0        0 wlp3s0
192.168.1.0     *               255.255.255.0   U     600    0        0 wlp3s0
I go online through a router from a laptop. I start vnn through the terminal.
Please tell me how can I fix this error?

Re: ERROR: Linux route add command failed: external program exited with error status: 2

Posted: Wed May 16, 2018 4:55 pm
by TinCanTech
Anna Gz wrote:
Wed May 16, 2018 4:06 pm

user nobody
group nogroup
Remove these from your client config so when it disconnects it can tear those routes down before adding them again on reconnection.

Re: ERROR: Linux route add command failed: external program exited with error status: 2

Posted: Wed May 16, 2018 5:28 pm
by Anna Gz
You are beautiful!
Thank you very much. Error has gone

Re: ERROR: Linux route add command failed: external program exited with error status: 2

Posted: Thu Mar 21, 2019 5:06 am
by rhinionic
I had this exact problem, but I do not know where to find the client.conf file such that I may edit it.

Re: ERROR: Linux route add command failed: external program exited with error status: 2

Posted: Thu Mar 21, 2019 6:29 am
by TinCanTech
rhinionic wrote:
Thu Mar 21, 2019 5:06 am
I do not know where to find the client.conf file
You are doomed.