# OpenVPN: "Linux route add command failed"

## knifeyspoony

Hi,

I am running the OpenVPN client via the startup script on my laptop; running the server on my home router.  I am able to connect to my router remotely, but then unable to route all my traffic through the router.  The client did work on a past Gentoo install.  I don't know what's different this time.

The crticial line below is ERROR: Linux route add command failed: shell command exited with error status: 7.  What is status 7?  Is there a way I can see what command OpenVPN is issuing, and perhaps a more verbose response from the shell?

Edit: I re-emerged with the ipconfig2 USE flag.  Only apparent difference: It exits with error status 2.

Log lines:

```

Jan 14 12:02:38 [openvpn] TCP connection established with ip.addy.at.home:80

Jan 14 12:02:38 [openvpn] TCP/UDP: Dynamic remote address changed during TCP connection establishment

Jan 14 12:02:38 [openvpn] TCPv4_CLIENT link local: [undef]

Jan 14 12:02:38 [openvpn] TCPv4_CLIENT link remote: ip.addy.at.home:80

Jan 14 12:02:44 [openvpn] Peer Connection Initiated with ip.addy.at.home:80

Jan 14 12:02:44 [openvpn] TUN/TAP device tap0 opened

Jan 14 12:02:44 [openvpn] /etc/openvpn/up.sh tap0 1500 1579   init

Jan 14 12:02:59 [openvpn] ERROR: Linux route add command failed: shell command exited with error stat

us: 7

Jan 14 12:02:59 [openvpn] Initialization Sequence Completed

```

openvpn.conf:

```
remote ip.addy.at.home

port 80

dev tap

secret /etc/openvpn/static.key

keepalive 10 60

proto tcp-client

persist-tun

persist-key

comp-lzo

route-gateway 192.168.1.1

redirect-gateway

route-delay 15

```

----------

## knifeyspoony

Ping.

----------

## Hu

Emerge dev-util/strace.  It will let you see the system calls made by the OpenVPN process, which should show you the arguments it is passing to the helper utility.  Run it as strace -f -tt -o /tmp/openvpn.strace openvpn openvpn-arguments.

----------

