This is client config file:
client
dev tun
proto udp
remote MY SERVER IP
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server
comp-lzo
verb 3
script-security 2
log openvpn.log
log-append openvpn.log
Server config file:
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
log openvpn.log
log-append openvpn.log
verb 3
push "redirect-gateway def1"
push "dhcp-option DNS 10.8.0.1"
Client log file:
Tue Oct 7 17:20:24 2014 OpenVPN 2.2.1 i486-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Jun 19 2013
Tue Oct 7 17:20:24 2014 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Tue Oct 7 17:20:24 2014 LZO compression initialized
Tue Oct 7 17:20:24 2014 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Oct 7 17:20:24 2014 Socket Buffers: R=[163840->131072] S=[163840->131072]
Tue Oct 7 17:20:24 2014 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Oct 7 17:20:24 2014 Local Options hash (VER=V4): '41690919'
Tue Oct 7 17:20:24 2014 Expected Remote Options hash (VER=V4): '530fdded'
Tue Oct 7 17:20:24 2014 UDPv4 link local: [undef]
Tue Oct 7 17:20:24 2014 UDPv4 link remote: [AF_INET]MY SERVER IP:1194
Tue Oct 7 17:21:24 2014 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Tue Oct 7 17:21:24 2014 TLS Error: TLS handshake failed
Tue Oct 7 17:21:24 2014 TCP/UDP: Closing socket
Tue Oct 7 17:21:24 2014 SIGUSR1[soft,tls-error] received, process restarting
Tue Oct 7 17:21:24 2014 Restart pause, 2 second(s)
Tue Oct 7 17:21:26 2014 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Tue Oct 7 17:21:26 2014 Re-using SSL/TLS context
Tue Oct 7 17:21:26 2014 LZO compression initialized
Tue Oct 7 17:21:26 2014 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Oct 7 17:21:26 2014 Socket Buffers: R=[163840->131072] S=[163840->131072]
Tue Oct 7 17:21:26 2014 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Oct 7 17:21:26 2014 Local Options hash (VER=V4): '41690919'
Tue Oct 7 17:21:26 2014 Expected Remote Options hash (VER=V4): '530fdded'
Tue Oct 7 17:21:26 2014 UDPv4 link local: [undef]
Tue Oct 7 17:21:26 2014 UDPv4 link remote: [AF_INET]MY SERVER IP:1194
Tue Oct 7 17:22:26 2014 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Tue Oct 7 17:22:26 2014 TLS Error: TLS handshake failed
Tue Oct 7 17:22:26 2014 TCP/UDP: Closing socket
Tue Oct 7 17:22:26 2014 SIGUSR1[soft,tls-error] received, process restarting
Tue Oct 7 17:22:26 2014 Restart pause, 2 second(s)
Tue Oct 7 17:22:28 2014 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Tue Oct 7 17:22:28 2014 Re-using SSL/TLS context
Tue Oct 7 17:22:28 2014 LZO compression initialized
Tue Oct 7 17:22:28 2014 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Oct 7 17:22:28 2014 Socket Buffers: R=[163840->131072] S=[163840->131072]
Tue Oct 7 17:22:28 2014 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Oct 7 17:22:28 2014 Local Options hash (VER=V4): '41690919'
Tue Oct 7 17:22:28 2014 Expected Remote Options hash (VER=V4): '530fdded'
Tue Oct 7 17:22:28 2014 UDPv4 link local: [undef]
Tue Oct 7 17:22:28 2014 UDPv4 link remote: [AF_INET]MY SERVER IP:1194
Tue Oct 7 17:23:28 2014 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Tue Oct 7 17:23:28 2014 TLS Error: TLS handshake failed
Tue Oct 7 17:23:28 2014 TCP/UDP: Closing socket
Tue Oct 7 17:23:28 2014 SIGUSR1[soft,tls-error] received, process restarting
Tue Oct 7 17:23:28 2014 Restart pause, 2 second(s)
Tue Oct 7 17:23:30 2014 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Tue Oct 7 17:23:30 2014 Re-using SSL/TLS context
Tue Oct 7 17:23:30 2014 LZO compression initialized
Tue Oct 7 17:23:30 2014 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Oct 7 17:23:30 2014 Socket Buffers: R=[163840->131072] S=[163840->131072]
Tue Oct 7 17:23:30 2014 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Oct 7 17:23:30 2014 Local Options hash (VER=V4): '41690919'
Tue Oct 7 17:23:30 2014 Expected Remote Options hash (VER=V4): '530fdded'
Tue Oct 7 17:23:30 2014 UDPv4 link local: [undef]
Tue Oct 7 17:23:30 2014 UDPv4 link remote: [AF_INET]MY SERVER IP:1194
Tue Oct 7 17:23:30 2014 TLS: Initial packet from [AF_INET]MY SERVER IP:1194, sid=19722a7d 8ef93a06
Tue Oct 7 17:23:30 2014 VERIFY OK: depth=1, /C=US/ST=CA/L=SanFrancisco/O=Fort-Funston/OU=changeme/CN=changeme/name=changeme/emailAddress=mail@host.domain
Tue Oct 7 17:23:30 2014 VERIFY OK: nsCertType=SERVER
Tue Oct 7 17:23:30 2014 VERIFY OK: depth=0, /C=US/ST=CA/L=SanFrancisco/O=Fort-Funston/OU=changeme/CN=server/name=changeme/emailAddress=mail@host.domain
Tue Oct 7 17:23:30 2014 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Oct 7 17:23:30 2014 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Oct 7 17:23:30 2014 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Oct 7 17:23:30 2014 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Oct 7 17:23:30 2014 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Tue Oct 7 17:23:30 2014 [server] Peer Connection Initiated with [AF_INET]MY SERVER IP:1194
Tue Oct 7 17:23:33 2014 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Tue Oct 7 17:23:33 2014 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 10.8.0.1,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5'
Tue Oct 7 17:23:33 2014 OPTIONS IMPORT: timers and/or timeouts modified
Tue Oct 7 17:23:33 2014 OPTIONS IMPORT: --ifconfig/up options modified
Tue Oct 7 17:23:33 2014 OPTIONS IMPORT: route options modified
Tue Oct 7 17:23:33 2014 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Tue Oct 7 17:23:33 2014 ROUTE default_gateway=172.16.0.1
Tue Oct 7 17:23:33 2014 TUN/TAP device tun0 opened
Tue Oct 7 17:23:33 2014 TUN/TAP TX queue length set to 100
Tue Oct 7 17:23:33 2014 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Tue Oct 7 17:23:33 2014 /sbin/ifconfig tun0 10.8.0.6 pointopoint 10.8.0.5 mtu 1500
Tue Oct 7 17:23:33 2014 /sbin/route add -net MY SERVER IP netmask 255.255.255.255 gw 172.16.0.1
Tue Oct 7 17:23:33 2014 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.8.0.5
Tue Oct 7 17:23:33 2014 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.8.0.5
Tue Oct 7 17:23:33 2014 /sbin/route add -net 10.8.0.1 netmask 255.255.255.255 gw 10.8.0.5
Tue Oct 7 17:23:33 2014 Initialization Sequence Completed
Server log file:
Tue Oct 7 17:20:18 2014 OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Jun 18 2013
Tue Oct 7 17:20:18 2014 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Tue Oct 7 17:20:18 2014 Diffie-Hellman initialized with 1024 bit key
Tue Oct 7 17:20:18 2014 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Oct 7 17:20:18 2014 Socket Buffers: R=[229376->131072] S=[229376->131072]
Tue Oct 7 17:20:18 2014 ROUTE default_gateway=192.168.77.253
Tue Oct 7 17:20:18 2014 TUN/TAP device tun0 opened
Tue Oct 7 17:20:18 2014 TUN/TAP TX queue length set to 100
Tue Oct 7 17:20:18 2014 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Tue Oct 7 17:20:18 2014 /sbin/ifconfig tun0 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Tue Oct 7 17:20:18 2014 /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
Tue Oct 7 17:20:18 2014 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Oct 7 17:20:18 2014 UDPv4 link local (bound): [undef]
Tue Oct 7 17:20:18 2014 UDPv4 link remote: [undef]
Tue Oct 7 17:20:18 2014 MULTI: multi_init called, r=256 v=256
Tue Oct 7 17:20:18 2014 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
Tue Oct 7 17:20:18 2014 ifconfig_pool_read(), in='client1,10.8.0.4', TODO: IPv6
Tue Oct 7 17:20:18 2014 succeeded -> ifconfig_pool_set()
Tue Oct 7 17:20:18 2014 IFCONFIG POOL LIST
Tue Oct 7 17:20:18 2014 client1,10.8.0.4
Tue Oct 7 17:20:18 2014 Initialization Sequence Completed
Tue Oct 7 17:20:28 2014 MULTI: multi_create_instance called
Tue Oct 7 17:20:28 2014 147.91.36.35:50461 Re-using SSL/TLS context
Tue Oct 7 17:20:28 2014 147.91.36.35:50461 LZO compression initialized
Tue Oct 7 17:20:28 2014 147.91.36.35:50461 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Oct 7 17:20:28 2014 147.91.36.35:50461 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Oct 7 17:20:28 2014 147.91.36.35:50461 Local Options hash (VER=V4): '530fdded'
Tue Oct 7 17:20:28 2014 147.91.36.35:50461 Expected Remote Options hash (VER=V4): '41690919'
Tue Oct 7 17:20:28 2014 147.91.36.35:50461 TLS: Initial packet from [AF_INET]147.91.36.35:50461, sid=a26ab6c2 e5d72da1
Tue Oct 7 17:21:28 2014 147.91.36.35:50461 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Tue Oct 7 17:21:28 2014 147.91.36.35:50461 TLS Error: TLS handshake failed
Tue Oct 7 17:21:28 2014 147.91.36.35:50461 SIGUSR1[soft,tls-error] received, client-instance restarting
Tue Oct 7 17:21:30 2014 MULTI: multi_create_instance called
Tue Oct 7 17:21:30 2014 147.91.36.35:41985 Re-using SSL/TLS context
Tue Oct 7 17:21:30 2014 147.91.36.35:41985 LZO compression initialized
Tue Oct 7 17:21:30 2014 147.91.36.35:41985 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Oct 7 17:21:30 2014 147.91.36.35:41985 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Oct 7 17:21:30 2014 147.91.36.35:41985 Local Options hash (VER=V4): '530fdded'
Tue Oct 7 17:21:30 2014 147.91.36.35:41985 Expected Remote Options hash (VER=V4): '41690919'
Tue Oct 7 17:21:30 2014 147.91.36.35:41985 TLS: Initial packet from [AF_INET]147.91.36.35:41985, sid=a984cad3 dab26253
Tue Oct 7 17:22:30 2014 147.91.36.35:41985 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Tue Oct 7 17:22:30 2014 147.91.36.35:41985 TLS Error: TLS handshake failed
Tue Oct 7 17:22:30 2014 147.91.36.35:41985 SIGUSR1[soft,tls-error] received, client-instance restarting
Tue Oct 7 17:22:32 2014 MULTI: multi_create_instance called
Tue Oct 7 17:22:32 2014 147.91.36.35:48429 Re-using SSL/TLS context
Tue Oct 7 17:22:32 2014 147.91.36.35:48429 LZO compression initialized
Tue Oct 7 17:22:32 2014 147.91.36.35:48429 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Oct 7 17:22:32 2014 147.91.36.35:48429 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Oct 7 17:22:32 2014 147.91.36.35:48429 Local Options hash (VER=V4): '530fdded'
Tue Oct 7 17:22:32 2014 147.91.36.35:48429 Expected Remote Options hash (VER=V4): '41690919'
Tue Oct 7 17:22:32 2014 147.91.36.35:48429 TLS: Initial packet from [AF_INET]147.91.36.35:48429, sid=c4ce8cbf 02d038c9
Tue Oct 7 17:23:32 2014 147.91.36.35:48429 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Tue Oct 7 17:23:32 2014 147.91.36.35:48429 TLS Error: TLS handshake failed
Tue Oct 7 17:23:32 2014 147.91.36.35:48429 SIGUSR1[soft,tls-error] received, client-instance restarting
Tue Oct 7 17:23:34 2014 MULTI: multi_create_instance called
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 Re-using SSL/TLS context
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 LZO compression initialized
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 Local Options hash (VER=V4): '530fdded'
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 Expected Remote Options hash (VER=V4): '41690919'
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 TLS: Initial packet from [AF_INET]147.91.36.35:55586, sid=44b42c5e ca5fd573
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 VERIFY OK: depth=1, /C=US/ST=CA/L=SanFrancisco/O=Fort-Funston/OU=changeme/CN=changeme/name=changeme/emailAddress=mail@host.domain
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 VERIFY OK: depth=0, /C=US/ST=CA/L=SanFrancisco/O=Fort-Funston/OU=changeme/CN=client1/name=changeme/emailAddress=mail@host.domain
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Tue Oct 7 17:23:34 2014 147.91.36.35:55586 [client1] Peer Connection Initiated with [AF_INET]147.91.36.35:55586
Tue Oct 7 17:23:34 2014 client1/147.91.36.35:55586 MULTI_sva: pool returned IPv4=10.8.0.6, IPv6=1::1a00:0:117f:0
Tue Oct 7 17:23:34 2014 client1/147.91.36.35:55586 MULTI: Learn: 10.8.0.6 -> client1/147.91.36.35:55586
Tue Oct 7 17:23:34 2014 client1/147.91.36.35:55586 MULTI: primary virtual IP for client1/147.91.36.35:55586: 10.8.0.6
Tue Oct 7 17:23:37 2014 client1/147.91.36.35:55586 PUSH: Received control message: 'PUSH_REQUEST'
Tue Oct 7 17:23:37 2014 client1/147.91.36.35:55586 send_push_reply(): safe_cap=960
Tue Oct 7 17:23:37 2014 client1/147.91.36.35:55586 SENT CONTROL [client1]: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 10.8.0.1,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5' (status=1)
Tue Oct 7 17:24:42 2014 event_wait : Interrupted system call (code=4)
Tue Oct 7 17:24:42 2014 TCP/UDP: Closing socket
Tue Oct 7 17:24:42 2014 /sbin/route del -net 10.8.0.0 netmask 255.255.255.0
Tue Oct 7 17:24:42 2014 Closing TUN/TAP interface
Tue Oct 7 17:24:42 2014 /sbin/ifconfig tun0 0.0.0.0
Tue Oct 7 17:24:42 2014 SIGINT[hard,] received, process exiting
I am running client behind the proxy but it works without http-proxy in config file.