"could not execute external program" (chroot-ed environment)
Posted: Fri Aug 20, 2010 11:19 pm
I am getting the above error in instances where my OpenVPN provider resets the connection and changes the ip address of the tun0 device. I am using OpenVPN 2.1.1 i686-redhat-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Jan 5 2010.
When the connection is reset, but the ip address is not changed all is well.
I am also getting an error when I terminate OpenVPN (service openvpn stop). I need to mention that I am running OpenVPN in chrooted environment (uid:gid is _openvpn:_openvpn). The root (/) directory is in /var/lib/openvpn
I first thought that it may be a permission problem, but that does not appear to be the case (see below). Any ideas?
Here are my logs (xxx is my openvpn provider external ip address, yyy is my local network internal ip address, zzz is the ip address of the local tun device as assigned by my service provider):
-----------connection reset, ip (tun0) changed--------------------
Aug 19 04:44:51 test1 openvpn[6415]: NOTE: Pulled options changed on restart, will need to close and reopen TUN/TAP device.
Aug 19 04:44:51 test1 openvpn[6415]: /sbin/ip route del 239.0.0.0/8
Aug 19 04:44:51 test1 openvpn[6415]: ERROR: Linux route delete command failed: could not execute external program
Aug 19 04:44:51 test1 openvpn[6415]: /sbin/ip route del xxx.xxx.xxx.xxx/32
Aug 19 04:44:51 test1 openvpn[6415]: ERROR: Linux route delete command failed: could not execute external program
Aug 19 04:44:51 test1 openvpn[6415]: /sbin/ip route del 0.0.0.0/1
Aug 19 04:44:51 test1 openvpn[6415]: ERROR: Linux route delete command failed: could not execute external program
Aug 19 04:44:51 test1 openvpn[6415]: /sbin/ip route del 128.0.0.0/1
Aug 19 04:44:51 test1 openvpn[6415]: ERROR: Linux route delete command failed: could not execute external program
Aug 19 04:44:51 test1 openvpn[6415]: Closing TUN/TAP interface
---------------------------------------------------------------------
-----------service openvpn stop executed-----------------------------
Aug 20 13:04:42 test1 openvpn[1589]: /sbin/ip route del 239.0.0.0/8
Aug 20 13:04:42 test1 openvpn[1589]: ERROR: Linux route delete command failed: could not execute external program
Aug 20 13:04:42 test1 openvpn[1589]: /sbin/ip route del yyy.yyy.yyy.yyy/29
Aug 20 13:04:42 test1 openvpn[1589]: ERROR: Linux route delete command failed: could not execute external program
Aug 20 13:04:42 test1 openvpn[1589]: /sbin/ip route del xxx.xxx.xxx.xxx/32
Aug 20 13:04:42 test1 openvpn[1589]: ERROR: Linux route delete command failed: could not execute external program
Aug 20 13:04:42 test1 openvpn[1589]: /sbin/ip route del 0.0.0.0/1
Aug 20 13:04:42 test1 openvpn[1589]: ERROR: Linux route delete command failed: could not execute external program
Aug 20 13:04:42 test1 openvpn[1589]: /sbin/ip route del 128.0.0.0/1
Aug 20 13:04:42 test1 openvpn[1589]: ERROR: Linux route delete command failed: could not execute external program
Aug 20 13:04:42 test1 openvpn[1589]: Closing TUN/TAP interface
Aug 20 13:04:42 test1 openvpn[1589]: /sbin/ip addr del dev tun0 zzz.zzz.zzz.zzz/24
Aug 20 13:04:42 test1 openvpn[1589]: Linux ip addr del failed: could not execute external program
---------------------------------------------------------------------
-----------connection reset, ip (tun0) NOT changed--------------------
Aug 18 03:18:23 test1 openvpn[6415]: OPTIONS IMPORT: timers and/or timeouts modified
Aug 18 03:18:23 test1 openvpn[6415]: OPTIONS IMPORT: --ifconfig/up options modified
Aug 18 03:18:23 test1 openvpn[6415]: OPTIONS IMPORT: route options modified
Aug 18 03:18:23 test1 openvpn[6415]: OPTIONS IMPORT: route-related options modified
Aug 18 03:18:23 test1 openvpn[6415]: OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Aug 18 03:18:23 test1 openvpn[6415]: Preserving previous TUN/TAP instance: tun0
Aug 18 03:18:23 test1 openvpn[6415]: Initialization Sequence Completed
---------------------------------------------------------------------
-bash-4.1# ls -las /var/lib/openvpn/sbin/
total 240
4 drwxr-x---. 2 _openvpn root 4096 Aug 18 01:22 .
4 drwxr-x---. 3 _openvpn root 4096 Aug 18 01:22 ..
232 -rwxr-x---. 1 root _openvpn 233244 Aug 18 01:22 ip
When the connection is reset, but the ip address is not changed all is well.
I am also getting an error when I terminate OpenVPN (service openvpn stop). I need to mention that I am running OpenVPN in chrooted environment (uid:gid is _openvpn:_openvpn). The root (/) directory is in /var/lib/openvpn
I first thought that it may be a permission problem, but that does not appear to be the case (see below). Any ideas?
Here are my logs (xxx is my openvpn provider external ip address, yyy is my local network internal ip address, zzz is the ip address of the local tun device as assigned by my service provider):
-----------connection reset, ip (tun0) changed--------------------
Aug 19 04:44:51 test1 openvpn[6415]: NOTE: Pulled options changed on restart, will need to close and reopen TUN/TAP device.
Aug 19 04:44:51 test1 openvpn[6415]: /sbin/ip route del 239.0.0.0/8
Aug 19 04:44:51 test1 openvpn[6415]: ERROR: Linux route delete command failed: could not execute external program
Aug 19 04:44:51 test1 openvpn[6415]: /sbin/ip route del xxx.xxx.xxx.xxx/32
Aug 19 04:44:51 test1 openvpn[6415]: ERROR: Linux route delete command failed: could not execute external program
Aug 19 04:44:51 test1 openvpn[6415]: /sbin/ip route del 0.0.0.0/1
Aug 19 04:44:51 test1 openvpn[6415]: ERROR: Linux route delete command failed: could not execute external program
Aug 19 04:44:51 test1 openvpn[6415]: /sbin/ip route del 128.0.0.0/1
Aug 19 04:44:51 test1 openvpn[6415]: ERROR: Linux route delete command failed: could not execute external program
Aug 19 04:44:51 test1 openvpn[6415]: Closing TUN/TAP interface
---------------------------------------------------------------------
-----------service openvpn stop executed-----------------------------
Aug 20 13:04:42 test1 openvpn[1589]: /sbin/ip route del 239.0.0.0/8
Aug 20 13:04:42 test1 openvpn[1589]: ERROR: Linux route delete command failed: could not execute external program
Aug 20 13:04:42 test1 openvpn[1589]: /sbin/ip route del yyy.yyy.yyy.yyy/29
Aug 20 13:04:42 test1 openvpn[1589]: ERROR: Linux route delete command failed: could not execute external program
Aug 20 13:04:42 test1 openvpn[1589]: /sbin/ip route del xxx.xxx.xxx.xxx/32
Aug 20 13:04:42 test1 openvpn[1589]: ERROR: Linux route delete command failed: could not execute external program
Aug 20 13:04:42 test1 openvpn[1589]: /sbin/ip route del 0.0.0.0/1
Aug 20 13:04:42 test1 openvpn[1589]: ERROR: Linux route delete command failed: could not execute external program
Aug 20 13:04:42 test1 openvpn[1589]: /sbin/ip route del 128.0.0.0/1
Aug 20 13:04:42 test1 openvpn[1589]: ERROR: Linux route delete command failed: could not execute external program
Aug 20 13:04:42 test1 openvpn[1589]: Closing TUN/TAP interface
Aug 20 13:04:42 test1 openvpn[1589]: /sbin/ip addr del dev tun0 zzz.zzz.zzz.zzz/24
Aug 20 13:04:42 test1 openvpn[1589]: Linux ip addr del failed: could not execute external program
---------------------------------------------------------------------
-----------connection reset, ip (tun0) NOT changed--------------------
Aug 18 03:18:23 test1 openvpn[6415]: OPTIONS IMPORT: timers and/or timeouts modified
Aug 18 03:18:23 test1 openvpn[6415]: OPTIONS IMPORT: --ifconfig/up options modified
Aug 18 03:18:23 test1 openvpn[6415]: OPTIONS IMPORT: route options modified
Aug 18 03:18:23 test1 openvpn[6415]: OPTIONS IMPORT: route-related options modified
Aug 18 03:18:23 test1 openvpn[6415]: OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Aug 18 03:18:23 test1 openvpn[6415]: Preserving previous TUN/TAP instance: tun0
Aug 18 03:18:23 test1 openvpn[6415]: Initialization Sequence Completed
---------------------------------------------------------------------
-bash-4.1# ls -las /var/lib/openvpn/sbin/
total 240
4 drwxr-x---. 2 _openvpn root 4096 Aug 18 01:22 .
4 drwxr-x---. 3 _openvpn root 4096 Aug 18 01:22 ..
232 -rwxr-x---. 1 root _openvpn 233244 Aug 18 01:22 ip