Here's a perfect example of what I'm talking about (internet connectivity lost, attempts to restart but can't resolve)
here's what happened when the internet connection went out:
...**same "bad packet ID"**...
Wed Apr 17 18:50:13 2013 us=80837 Authenticate/Decrypt packet error: bad packet ID (may be a replay): [ #862381 ] -- see the man page entry for --no-replay and --replay-window for more info or silence this warning with --mute-replay-warnings
Wed Apr 17 18:50:13 2013 us=80837 Authenticate/Decrypt packet error: bad packet ID (may be a replay): [ #862382 ] -- see the man page entry for --no-replay and --replay-window for more info or silence this warning with --mute-replay-warnings
Wed Apr 17 18:50:13 2013 us=98839 Authenticate/Decrypt packet error: bad packet ID (may be a replay): [ #862383 ] -- see the man page entry for --no-replay and --replay-window for more info or silence this warning with --mute-replay-warnings
Wed Apr 17 18:52:56 2013 us=72534 [server] Inactivity timeout (--ping-restart), restarting
Wed Apr 17 18:52:56 2013 us=73034 TCP/UDP: Closing socket
Wed Apr 17 18:52:56 2013 us=73034 SIGUSR1[soft,ping-restart] received, process restarting
Wed Apr 17 18:52:56 2013 us=73535 MANAGEMENT: >STATE:1366217576,RECONNECTING,ping-restart,,
Wed Apr 17 18:52:56 2013 us=73535 Restart pause, 2 second(s)
Wed Apr 17 18:52:58 2013 us=73789 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Apr 17 18:52:58 2013 us=74289 Re-using SSL/TLS context
Wed Apr 17 18:52:58 2013 us=74289 LZO compression initialized
Wed Apr 17 18:52:58 2013 us=74789 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Wed Apr 17 18:52:58 2013 us=74789 Socket Buffers: R=[8192->8192] S=[8192->8192]
Wed Apr 17 18:52:58 2013 us=75289 MANAGEMENT: >STATE:1366217578,RESOLVE,,,
Wed Apr 17 18:53:10 2013 us=92815 RESOLVE: Cannot resolve host address: vpn.example.com: The requested name is valid, but no data of the requested type was found.
Wed Apr 17 18:53:10 2013 us=93315 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Apr 17 18:53:10 2013 us=93315 Local Options String: 'V4,dev-type tun,link-mtu 1542,tun-mtu 1500,proto UDPv4,comp-lzo,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-client'
Wed Apr 17 18:53:10 2013 us=93315 Expected Remote Options String: 'V4,dev-type tun,link-mtu 1542,tun-mtu 1500,proto UDPv4,comp-lzo,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-server'
Wed Apr 17 18:53:10 2013 us=93815 Local Options hash (VER=V4): '41690919'
Wed Apr 17 18:53:10 2013 us=93815 Expected Remote Options hash (VER=V4): '530fdded'
Wed Apr 17 18:53:10 2013 us=93815 MANAGEMENT: >STATE:1366217590,RESOLVE,,,
Wed Apr 17 18:53:22 2013 us=95839 RESOLVE: Cannot resolve host address: vpn.example.com: The requested name is valid, but no data of the requested type was found.
Wed Apr 17 18:53:39 2013 us=97998 RESOLVE: Cannot resolve host address: vpn.example.com: The requested name is valid, but no data of the requested type was found.
Wed Apr 17 18:53:56 2013 us=100657 RESOLVE: Cannot resolve host address: vpn.example.com: The requested name is valid, but no data of the requested type was found.
...**same "cannot resolve"**...
as I hit "disconnect" it gave this:
Wed Apr 17 18:58:45 2013 us=139860 RESOLVE: signal received during DNS resolution attempt
Wed Apr 17 18:58:45 2013 us=140860 TCP/UDP: Closing socket
Wed Apr 17 18:58:45 2013 us=140860 C:\Windows\system32\route.exe DELETE 10.119.1.1 MASK 255.255.255.255 10.119.1.5
Wed Apr 17 18:58:45 2013 us=146361 Route deletion via IPAPI succeeded [adaptive]
Wed Apr 17 18:58:45 2013 us=146861 C:\Windows\system32\route.exe DELETE 109.201.152.16 MASK 255.255.255.255 192.168.1.1
Wed Apr 17 18:58:45 2013 us=152362 Route deletion via IPAPI succeeded [adaptive]
Wed Apr 17 18:58:45 2013 us=152362 C:\Windows\system32\route.exe DELETE 0.0.0.0 MASK 128.0.0.0 10.119.1.5
Wed Apr 17 18:58:45 2013 us=156362 Route deletion via IPAPI succeeded [adaptive]
Wed Apr 17 18:58:45 2013 us=156862 C:\Windows\system32\route.exe DELETE 128.0.0.0 MASK 128.0.0.0 10.119.1.5
Wed Apr 17 18:58:45 2013 us=161863 Route deletion via IPAPI succeeded [adaptive]
Wed Apr 17 18:58:45 2013 us=162363 Closing TUN/TAP interface
Wed Apr 17 18:58:45 2013 us=162863 SIGTERM[hard,init_instance] received, process exiting
Wed Apr 17 18:58:45 2013 us=162863 MANAGEMENT: >STATE:1366217925,EXITING,init_instance,,
it seems like OVPN doesn't reset route.exe when it restarts after a time out (--ping-restart), and therefore redirect-gateway is still on (as it's clear when after clicking disconnect it resets route.exe from the VPN values)?
so the solution would be to force OVPN to delete route and re-add again every time it --ping-restart (hard restart instead of soft)?