I can't get it to fail locally on my home network, but when on the road connected wirelessly at some hotel, the openvpn says it is connected but the default routing has failed and I can't use the vpn properly, but openvpn will sit there as if it were properly connected. This is very frustrating as it isn't consistently failing. Only sometimes...
When it fails, my client logs show a loop of these:
Code: Select all
Fri Feb 04 05:56:19 2011 TEST ROUTES: 0/0 succeeded len=0 ret=0 a=0 u/d=down
Fri Feb 04 05:56:19 2011 Route: Waiting for TUN/TAP interface to come up...
Code: Select all
TAP-Win32 Adapter V9
IP = 169.254.167.27/255.255.0.0
When it works, which is about 70% of the time it is usually successful (u/d=up) on the first attempt, but occasionally it might loop a few times before it is successful:
Code: Select all
Wed Feb 02 19:18:40 2011 TEST ROUTES: 0/0 succeeded len=0 ret=0 a=0 u/d=down
Wed Feb 02 19:18:40 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Feb 02 19:18:41 2011 TEST ROUTES: 0/0 succeeded len=0 ret=0 a=0 u/d=down
Wed Feb 02 19:18:41 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Feb 02 19:18:42 2011 TEST ROUTES: 1/1 succeeded len=0 ret=1 a=0 u/d=up
TAP-Win32 Adapter V9
IP = 192.168.111.2/255.255.255.192
Sometimes when it fails I see this:
WARNING: Failed to renew DHCP IP address lease on TAP-Win32 adapter: The system cannot find the file specified. (code=2)
or:
WARNING: Failed to renew DHCP IP address lease on TAP-Win32 adapter: The name specified in the network control block (NCB) is in use on a remote adapter. The NCB is the data. (code=5322)
or:
TAP: DHCP address renewal succeeded
But sometimes when it succeeds I see this:
WARNING: Failed to renew DHCP IP address lease on TAP-Win32 adapter: The system cannot find the file specified. (code=2)
So I don't know if it is related.
Is there any way to make it reliable without changing to some other non-dhcp/default route setup? I like it the way it is when it works, I just want it to reliably set the route. (setting a longer timeout on the attempts doesn't seem like a way to gain reliability, it might just loop for 5 minutes and fail...)
server config:
Code: Select all
dev tun-tcp
persist-key
persist-tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
tls-auth ta.key 0
cipher AES-128-CBC
comp-lzo
topology subnet
ifconfig-pool-persist ipp.txt
server 192.168.111.0 255.255.255.192
push "redirect-gateway def1"
push "dhcp-option DNS 192.168.1.1"
push "dhcp-option WINS 192.168.1.1"
keepalive 10 120
status openvpn-status.log
verb 3
Code: Select all
client
dev tun
nobind
persist-key
persist-tun
ca ca.crt
cert client2.crt
key client2.key
tls-auth ta.key 1
cipher AES-128-CBC
comp-lzo
verb 3
show-net-up
dhcp-renew
route-delay 0 60