I am having this error using OpenVPN client:

Mon Sep 25 07:46:43 2017 /sbin/ip link set dev tun0 up mtu 1500
Mon Sep 25 07:46:43 2017 /sbin/ip addr add dev tun0 local peer
Mon Sep 25 07:46:43 2017 /sbin/ip route add via
ip: RTNETLINK answers: File exists
Mon Sep 25 07:46:43 2017 ERROR: Linux route add command failed: external program exited with error status: 2
Mon Sep 25 07:46:43 2017 /sbin/ip route add via
Mon Sep 25 07:46:43 2017 /sbin/ip route add via
Mon Sep 25 07:46:43 2017 Initialization Sequence Completed

My client configuration is :

dev tun
remote myRemoteServer_IP <myRemoteServer_Port>


proto udp

script-security 2

reneg-sec 0

cipher AES-256-CBC

auth SHA1
auth-user-pass /etc/openvpn/auth.txt

log /etc/openvpn/openvpn.log
verb 3

# the certificate...

I am not the server administrator so I can't change the server configuration.. I tried the same configuration on my ubuntu and it is working...

My operating system is a costumized distribution of linux, the architceture is ARM (armv5tejl), the kernel is 3.10

Any idea how to fix this? thanks!


# ip route
default via dev eth0 via dev tun0 via dev tun0 dev tun0  src dev lo dev eth0  src
  • What does ip route show. You probably already have a route that conflicts with the route to and the kernel refuses to add the route. – Johan Myréen Sep 25 '17 at 8:50
  • I added the ip route result, I don't know much in networking, is there a routes conflit? how can I resolve this? thanks – sabrina2020 Sep 25 '17 at 8:56
  • 1
    The last line dev eth0 src shows that you already have a route to, which is apparently your local LAN. Why are you trying to add the new route to – Johan Myréen Sep 25 '17 at 9:27
  • actually it is the openvpn server that is pushing the routes. – sabrina2020 Sep 25 '17 at 9:30
  • 1
    Ok. I guess the network addresses are clashing: both the server and you local network use If this is the case, you will have to either renumber you own local LAN address space, or negotiate with the openvpn server admins to use a different subnet on the remote network. – Johan Myréen Sep 25 '17 at 10:59

Try once:

sudo ip link delete YOUR_NETWORK_INTERFACE


sudo ip link delete tun0
| improve this answer | |
  • 1
    Could you explain why this is supposed to help? – Stephen Kitt Dec 23 '19 at 15:36
  • 1
    It will delete the routes added by openvpn. so next time when you try connecting by openvpn it will not throw any error by saying routes already added. – Aslam Shaik Dec 25 '19 at 11:48
  • Actually, this was exactly the problem I had today, an old job OpenVPN configuration added a route that remained in place, and in my new job OpenVPN config was not working because of that. ip link delete command and reloading VPN solved the issue. – José L. Patiño Sep 9 at 13:19

Maybe a somewhat trivial answer, but in my case I solved it by rebooting the machine to resolve the conflict (to free that IP and make it available)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.