VPN session expires too quickly
-
- OpenVpn Newbie
- Posts: 6
- Joined: Fri Jul 29, 2011 3:00 am
VPN session expires too quickly
Hi,
My VPN session seems to disconnect/expire anywhere from 3-10 minutes after I connect. This is frustrating as I have to keep logging in not to mention I have to resume my stopped downloads.
Is there any way to fix this?
Thanks
My VPN session seems to disconnect/expire anywhere from 3-10 minutes after I connect. This is frustrating as I have to keep logging in not to mention I have to resume my stopped downloads.
Is there any way to fix this?
Thanks
- Bebop
- Forum Team
- Posts: 301
- Joined: Wed Dec 15, 2010 9:24 pm
Re: VPN session expires too quickly
There is (usually). Start by posting your client.conf (or client.ovpn), server.conf, and /etc/openvpn/openvpn.log (if exists).johnlm89 wrote:Is there any way to fix this?
The cure for boredom is curiosity
-
- OpenVpn Newbie
- Posts: 6
- Joined: Fri Jul 29, 2011 3:00 am
Re: VPN session expires too quickly
Hi Bebop,
I cannot find these files in my openvpn directory. Any specific folder they should be in?
I cannot find these files in my openvpn directory. Any specific folder they should be in?
- Bebop
- Forum Team
- Posts: 301
- Joined: Wed Dec 15, 2010 9:24 pm
Re: VPN session expires too quickly
in linux (centos/debian/ubuntu):johnlm89 wrote:Hi Bebop,
I cannot find these files in my openvpn directory. Any specific folder they should be in?
Code: Select all
cd /etc/openvpn
ls
Code: Select all
find /etc/openvpn -name *.conf
In your server.conf you can find a refernce to the location of the server log (if exists).
The cure for boredom is curiosity
-
- OpenVpn Newbie
- Posts: 6
- Joined: Fri Jul 29, 2011 3:00 am
Re: VPN session expires too quickly
as.conf file
log file# AS Client API config file for Windows
#
# IMPORTANT NOTE: '~' char refers to the directory that this config
# file is stored in, and not the 'HOME' env var
#DEBUG_SOCK=false
#DEBUG_SHOW_OMI=false
#DEBUG_SW_UPDATE=false
#DEBUG_SCRIPT_TEST=false
#DEBUG_PROFMAN=false
#DEBUG_CLIAPIXML=false
[capi]
openvpn_exe_path=~\..\core\openvpn.exe
python_script_interpreter=~\..\core\py.exe
helper=~\..\core\capihelper.exe
start_tray=true
profile_dir=~\profile
users_dir=~\users
log_dir=~\log
tmp_dir=~\tmp
capi_log=~\log\capi.log
capi_log_append=false
config_dir=~
script_dir=~\scripts
sock=944
document_root=~\..\client
multi_domain_port=946
[capi.swupdate]
work_dir=~\update
install_log=~\msi.log
base_url=http://swupdate.openvpn.net/updates
signing_ca_bundle=~\update-ca.crt
query_period=14400
error_period=120
min_period=14400
tray_nag_period=14400
Wed Jul 27 16:01:46 2011 OpenVPNAS 2.1.3nOAS Win32-MSVC++ [SSL] [LZO2] built on Mar 23 2011
Wed Jul 27 16:01:46 2011 MANAGEMENT: Connected to management server at 127.0.0.1:61276
Wed Jul 27 16:01:46 2011 MANAGEMENT: CMD 'log on'
Wed Jul 27 16:01:46 2011 MANAGEMENT: CMD 'state on'
Wed Jul 27 16:01:46 2011 MANAGEMENT: CMD 'echo on'
Wed Jul 27 16:01:46 2011 MANAGEMENT: CMD 'bytecount 5'
Wed Jul 27 16:01:46 2011 MANAGEMENT: CMD 'hold off'
Wed Jul 27 16:01:46 2011 MANAGEMENT: CMD 'hold release'
Wed Jul 27 16:01:46 2011 MANAGEMENT: CMD 'username "Auth" "ukaqp4cz@cable.acanac.net"'
Wed Jul 27 16:01:46 2011 MANAGEMENT: CMD 'password [...]'
Wed Jul 27 16:01:46 2011 NOTE: OpenVPNAS 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Jul 27 16:01:46 2011 Control Channel Authentication: tls-auth using INLINE static key file
Wed Jul 27 16:01:46 2011 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jul 27 16:01:46 2011 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jul 27 16:01:46 2011 Socket Buffers: R=[8192->100000] S=[8192->100000]
Wed Jul 27 16:01:46 2011 UDPv4 link local: [undef]
Wed Jul 27 16:01:46 2011 UDPv4 link remote: 67.55.0.106:443
Wed Jul 27 16:01:46 2011 MANAGEMENT: >STATE:1311796906,WAIT,,,
Wed Jul 27 16:01:46 2011 MANAGEMENT: >STATE:1311796906,AUTH,,,
Wed Jul 27 16:01:46 2011 TLS: Initial packet from 67.55.0.106:443, sid=14748add 3e48d528
Wed Jul 27 16:01:47 2011 VERIFY OK: depth=1, /CN=OpenVPN_CA
Wed Jul 27 16:01:47 2011 VERIFY OK: nsCertType=SERVER
Wed Jul 27 16:01:47 2011 VERIFY OK: depth=0, /CN=OpenVPN_Server
Wed Jul 27 16:01:47 2011 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Jul 27 16:01:47 2011 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jul 27 16:01:47 2011 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Jul 27 16:01:47 2011 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jul 27 16:01:47 2011 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Wed Jul 27 16:01:47 2011 [OpenVPN_Server] Peer Connection Initiated with 67.55.0.106:443
Wed Jul 27 16:01:48 2011 MANAGEMENT: >STATE:1311796908,GET_CONFIG,,,
Wed Jul 27 16:01:49 2011 SENT CONTROL [OpenVPN_Server]: 'PUSH_REQUEST' (status=1)
Wed Jul 27 16:01:49 2011 PUSH: Received control message: 'PUSH_REPLY,explicit-exit-notify,topology subnet,route-delay 5 30,dhcp-pre-release,dhcp-renew,dhcp-release,route-metric 101,ping 5,ping-restart 40,redirect-gateway def1,redirect-gateway bypass-dhcp,redirect-gateway autolocal,route-gateway 10.0.8.1,dhcp-option DNS 66.49.254.254,dhcp-option DNS 66.49.194.253,dhcp-option DNS 67.55.0.11,register-dns,comp-lzo yes,ifconfig 10.0.8.3 255.255.254.0'
Wed Jul 27 16:01:49 2011 OPTIONS IMPORT: timers and/or timeouts modified
Wed Jul 27 16:01:49 2011 OPTIONS IMPORT: explicit notify parm(s) modified
Wed Jul 27 16:01:49 2011 OPTIONS IMPORT: LZO parms modified
Wed Jul 27 16:01:49 2011 OPTIONS IMPORT: --ifconfig/up options modified
Wed Jul 27 16:01:49 2011 OPTIONS IMPORT: route options modified
Wed Jul 27 16:01:49 2011 OPTIONS IMPORT: route-related options modified
Wed Jul 27 16:01:49 2011 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Wed Jul 27 16:01:49 2011 ROUTE default_gateway=192.168.1.1
Wed Jul 27 16:01:49 2011 MANAGEMENT: >STATE:1311796909,ASSIGN_IP,,10.0.8.3,
Wed Jul 27 16:01:49 2011 TAP-WIN32 device [Local Area Connection 3] opened: \\.\Global\{5692E7FC-6B98-4AEE-9482-0D380084EB6E}.tap
Wed Jul 27 16:01:49 2011 TAP-Win32 Driver Version 9.7
Wed Jul 27 16:01:49 2011 Set TAP-Win32 TUN subnet mode network/local/netmask = 10.0.8.0/10.0.8.3/255.255.254.0 [SUCCEEDED]
Wed Jul 27 16:01:49 2011 Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.0.8.3/255.255.254.0 on interface {5692E7FC-6B98-4AEE-9482-0D380084EB6E} [DHCP-serv: 10.0.9.254, lease-time: 31536000]
Wed Jul 27 16:01:49 2011 Successful ARP Flush on interface [23] {5692E7FC-6B98-4AEE-9482-0D380084EB6E}
Wed Jul 27 16:01:49 2011 NOTE: Release of DHCP-assigned IP address lease on TAP-Win32 adapter failed: An address has not yet been associated with the network endpoint. (code=1228)
Wed Jul 27 16:01:53 2011 TAP: DHCP address renewal succeeded
Wed Jul 27 16:01:58 2011 TEST ROUTES: 1/1 succeeded len=0 ret=1 a=0 u/d=up
Wed Jul 27 16:01:58 2011 ROUTE remote_host is NOT LOCAL
Wed Jul 27 16:01:58 2011 C:\Windows\system32\route.exe ADD 67.55.0.106 MASK 255.255.255.255 192.168.1.1
Wed Jul 27 16:01:58 2011 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=20 and dwForwardType=4
Wed Jul 27 16:01:58 2011 Route addition via IPAPI succeeded [adaptive]
Wed Jul 27 16:01:58 2011 C:\Windows\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 10.0.8.1
Wed Jul 27 16:01:58 2011 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Wed Jul 27 16:01:58 2011 Route addition via IPAPI succeeded [adaptive]
Wed Jul 27 16:01:58 2011 C:\Windows\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.0.8.1
Wed Jul 27 16:01:58 2011 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Wed Jul 27 16:01:58 2011 Route addition via IPAPI succeeded [adaptive]
Wed Jul 27 16:01:58 2011 Initialization Sequence Completed
Wed Jul 27 16:01:58 2011 MANAGEMENT: >STATE:1311796918,CONNECTED,SUCCESS,10.0.8.3,67.55.0.106
Wed Jul 27 16:01:58 2011 Start net commands...
Wed Jul 27 16:01:58 2011 C:\WINDOWS\system32\net.exe stop dnscache
The DNS Client service is stopping..
The DNS Client service could not be stopped.
Wed Jul 27 16:02:03 2011 C:\WINDOWS\system32\net.exe start dnscache
The requested service has already been started.
More help is available by typing NET HELPMSG 2182.
Wed Jul 27 16:02:03 2011 ERROR: Windows ipconfig command failed: returned error code 2
Wed Jul 27 16:02:03 2011 C:\WINDOWS\system32\ipconfig.exe /flushdns
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
Wed Jul 27 16:02:04 2011 C:\WINDOWS\system32\ipconfig.exe /registerdns
Windows IP Configuration
Registration of the DNS resource records for all adapters of this computer has been initiated. Any errors will be reported in the Event Viewer in 15 minutes.
Wed Jul 27 16:02:07 2011 End net commands...
Wed Jul 27 16:02:16 2011 MANAGEMENT: CMD 'exit'
Wed Jul 27 16:02:16 2011 MANAGEMENT: Client disconnected
Wed Jul 27 16:02:16 2011 MANAGEMENT: Triggering management exit
Wed Jul 27 16:02:16 2011 SIGTERM received, sending exit notification to peer
Wed Jul 27 16:02:17 2011 C:\Windows\system32\route.exe DELETE 67.55.0.106 MASK 255.255.255.255 192.168.1.1
Wed Jul 27 16:02:17 2011 Route deletion via IPAPI succeeded [adaptive]
Wed Jul 27 16:02:17 2011 C:\Windows\system32\route.exe DELETE 0.0.0.0 MASK 128.0.0.0 10.0.8.1
Wed Jul 27 16:02:17 2011 Route deletion via IPAPI succeeded [adaptive]
Wed Jul 27 16:02:17 2011 C:\Windows\system32\route.exe DELETE 128.0.0.0 MASK 128.0.0.0 10.0.8.1
Wed Jul 27 16:02:17 2011 Route deletion via IPAPI succeeded [adaptive]
Wed Jul 27 16:02:17 2011 Closing TUN/TAP interface
Wed Jul 27 16:02:17 2011 TAP: DHCP address released
Wed Jul 27 16:02:17 2011 SIGTERM[soft,exit-with-notification] received, process exiting
Wed Jul 27 16:02:17 2011 MANAGEMENT: >STATE:1311796937,EXITING,exit-with-notification,,
- Mimiko
- Forum Team
- Posts: 1564
- Joined: Wed Sep 22, 2010 3:18 am
Re: VPN session expires too quickly
Hello.
So, you are on Windows. It always good to mention the system, on which you have trouble.
I think its not OpenVPN problem. From you client's log:
OpenVPN does this because server pushes DNS settings for your client.
So, you are on Windows. It always good to mention the system, on which you have trouble.
I think its not OpenVPN problem. From you client's log:
May be your client does not have enough privileges.Wed Jul 27 16:01:58 2011 C:\WINDOWS\system32\net.exe stop dnscache
The DNS Client service is stopping..
The DNS Client service could not be stopped.
OpenVPN sees that it cannot flush dns with first method and tryies the second.Wed Jul 27 16:02:03 2011 ERROR: Windows ipconfig command failed: returned error code 2
Wed Jul 27 16:02:03 2011 C:\WINDOWS\system32\ipconfig.exe /flushdns
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
OpenVPN does this because server pushes DNS settings for your client.
Are you sure that on the server side no one disconnects you or has a script that disconnects? It's external managed request to disconnect. And I see that you are disconnected not after 3-10 min, just immediatly.Wed Jul 27 16:02:16 2011 MANAGEMENT: CMD 'exit'
-
- OpenVpn Newbie
- Posts: 6
- Joined: Fri Jul 29, 2011 3:00 am
Re: VPN session expires too quickly
Yes I am on windows 7, I have almost no knowledge of programming/networking. I am also running it in my house, through a router.
- Mimiko
- Forum Team
- Posts: 1564
- Joined: Wed Sep 22, 2010 3:18 am
Re: VPN session expires too quickly
I don' have a OpenVPN AS client to see it. So type the full path to the as.conf you finded. There may be some config files also.
-
- OpenVpn Newbie
- Posts: 6
- Joined: Fri Jul 29, 2011 3:00 am
Re: VPN session expires too quickly
C:\Program Files (x86)\OpenVPN Technologies\OpenVPN Client\etc
- Mimiko
- Forum Team
- Posts: 1564
- Joined: Wed Sep 22, 2010 3:18 am
Re: VPN session expires too quickly
You can look in "profile" folder under this folder and see the files. In the content you will see the connection address.
The log you post, where did you get it?
Did you try to authenticate from OpenVPN AS site? Can you download from the site the installer of OpenVPN connect and reintsall it?
The log you post, where did you get it?
Did you try to authenticate from OpenVPN AS site? Can you download from the site the installer of OpenVPN connect and reintsall it?
-
- OpenVpn Newbie
- Posts: 6
- Joined: Fri Jul 29, 2011 3:00 am
Re: VPN session expires too quickly
Okay I downloaded the client version. Seems to be working fine now. Thanks for you help guys, sorry I wasn't as tech savvy as the rest of the forum.