Hi,
I installed OpenWrt (WhiteRussian) on my Linksys WRT54GL and I'm having problems with OpenVPN.
I'm looking for a solution for my problem for very long time and can't find it anywhere.
The problem is that every 24 Hours OpenVPN disconnects and can't reconnect again.
I noticed for the following messages in the log file (I removed line which are the same) :
Jul 21 21:59:12 (none) kern.err openvpn[905]: event_wait : Interrupted system call (code=4)
Jul 21 21:59:12 (none) kern.notice openvpn[905]: TCP/UDP: Closing socket
Jul 21 21:59:12 (none) kern.notice openvpn[905]: /sbin/route del -net X.X.X.X netmask 255.255.255.0
Jul 21 21:59:12 (none) kern.info dnsmasq[707]: reading /tmp/resolv.conf.auto
Jul 21 21:59:12 (none) kern.info dnsmasq[707]: using nameserver X.X.X.X#53 for domain XXXX
Jul 21 21:59:12 (none) kern.info dnsmasq[707]: using nameserver X.X.X.X#53 for domain XXXX
Jul 21 21:59:12 (none) kern.info dnsmasq[707]: using local addresses only for domain lan
Jul 21 21:59:12 (none) kern.notice openvpn[905]: /sbin/route del -net X.X.X.X netmask 255.255.255.0
...
Jul 21 21:59:12 (none) kern.notice openvpn[1412]: OpenVPN 2.0.8 mipsel-linux [SSL] [LZO] [EPOLL] built on Jan 30 2007
Jul 21 21:59:12 (none) kern.notice openvpn[905]: /sbin/route del -net X.X.X.X netmask 255.255.255.0
Jul 21 21:59:13 (none) kern.notice openvpn[1412]: Diffie-Hellman initialized with 1024 bit key
Jul 21 21:59:13 (none) kern.notice openvpn[1412]: TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Jul 21 21:59:13 (none) kern.notice openvpn[905]: /sbin/route del -net X.X.X.X netmask 255.255.255.0
Jul 21 21:59:13 (none) kern.notice openvpn[1412]: TUN/TAP device tun1 opened
Jul 21 21:59:13 (none) kern.notice openvpn[1412]: TUN/TAP TX queue length set to 100
Jul 21 21:59:13 (none) kern.notice openvpn[1412]: /sbin/ifconfig tun1 10.55.1.1 pointopoint 10.55.1.2 mtu 1500
Jul 21 21:59:14 (none) kern.notice openvpn[905]: /sbin/route del -net X.X.X.X netmask 255.255.255.0
Jul 21 21:59:14 (none) kern.notice openvpn[905]: /sbin/route del -net X.X.X.X netmask 255.255.255.0
Jul 21 21:59:14 (none) kern.notice openvpn[1412]: /sbin/route add -net X.X.X.X netmask 255.255.255.0 gw 10.55.1.2
...
Jul 21 21:59:14 (none) kern.notice openvpn[905]: /sbin/route del -net X.X.X.X netmask 255.255.255.0
Jul 21 21:59:14 (none) kern.notice openvpn[905]: Closing TUN/TAP interface
Jul 21 21:59:14 (none) kern.notice openvpn[905]: SIGTERM[hard,] received, process exiting
Jul 21 21:59:14 (none) kern.notice openvpn[1412]: /sbin/route add -net X.X.X.X netmask 255.255.255.0 gw 10.55.1.2
...
Jul 21 21:59:15 (none) kern.notice openvpn[1412]: /sbin/route add -net 10.55.1.0 netmask 255.255.255.0 gw 10.55.1.2
Jul 21 21:59:15 (none) kern.notice openvpn[1412]: Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Jul 21 21:59:15 (none) kern.notice openvpn[1549]: Socket Buffers: R=[32767->65534] S=[32767->65534]
Jul 21 21:59:15 (none) kern.notice openvpn[1549]: UDPv4 link local (bound): [undef]:1194
Jul 21 21:59:15 (none) kern.notice openvpn[1549]: UDPv4 link remote: [undef]
Jul 21 21:59:15 (none) kern.notice openvpn[1549]: MULTI: multi_init called, r=256 v=256
Jul 21 21:59:15 (none) kern.notice openvpn[1549]: IFCONFIG POOL: base=10.55.1.4 size=62
Jul 21 21:59:15 (none) kern.notice openvpn[1549]: IFCONFIG POOL LIST
Jul 21 21:59:15 (none) kern.notice openvpn[1549]: Initialization Sequence Completed
I'm using openwrt and openvpn in order to be able to connect to the office network.
My router is set as the vpn server and we have an openvpn clients pc at the office.
As you can see openvpn disconnects and than tries to initialize the connection again, but it fails although it says :
"Initialization Sequence Completed"
I'm trying to ping one of the pc that are in my office network and I get an error message : "No route to host"
The only way to resolve this problem is to kill openvpn and to start it again.
So I have some question :
1. Does someone knows what it the meaning of "Interrupted system call (code=4)" ?
2. I noticed that every hour openvpn closes the connection and starts it again, due to "TLS: tls_process: killed expiring key",
but at this case there is no problem to connected to the office network.
3. I think that the problem is that when openvpn close the connection due to code=4, it start it again without really "waiting" for
the 'stop' action to finish, you can see in the above log that there are some 'route add' lines between the 'route del' lines and even
before the lines :
Jul 21 21:59:14 (none) kern.notice openvpn[905]: Closing TUN/TAP interface
Jul 21 21:59:14 (none) kern.notice openvpn[905]: SIGTERM[hard,] received, process exiting
Does anyone know if there's a way to tell openvpn to wait for a specific amount of time before opening the connection again ?
Thanks,
Sagi.