Hello guys,
i have a permanent problem to connect through TCP-protocol.
When i´m connecting throug UDP the connection is established in a few seconds.
After many tretries and customizing configuration i couldn´t never connect via TCP-protocol.
My environment is as follows:
Server: DSL-Router with busbox 1.16.1 on it.
Client: Win7 64bit running OpenVPN 2.1.1 with UMTS-modem
Here are my Configs:
Server-Config:
port 1194
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.50.0 255.255.255.0"
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
log openvpn.log
verb 7
Client-Config:
client
dev tun
proto tcp
remote xxx.xxx.xxx.xxx 443
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server
comp-lzo
verb 7
Here are the Logs:
Server-Log (Parts):
When i´m connecting to TCP and using the verbose-level 5 and lower:
-----------------------------------------------------------------------
Wed Aug 22 12:59:34 2012 us=40157 Socket Buffers: R=[87380->131072] S=[16384->131072]
Wed Aug 22 12:59:34 2012 us=40510 TCPv4_SERVER link local (bound): [undef]:1194
Wed Aug 22 12:59:34 2012 us=40768 TCPv4_SERVER link remote: [undef]
Wed Aug 22 12:59:34 2012 us=43150 MULTI: multi_init called, r=256 v=256
Wed Aug 22 12:59:34 2012 us=43887 IFCONFIG POOL: base=10.8.0.4 size=62
Wed Aug 22 12:59:34 2012 us=44559 IFCONFIG POOL LIST
Wed Aug 22 12:59:34 2012 us=44836 Client1,10.8.0.4
Wed Aug 22 12:59:34 2012 us=45075 client1,10.8.0.8
Wed Aug 22 12:59:34 2012 us=45866 MULTI: TCP INIT maxclients=1024 maxevents=1028
Wed Aug 22 12:59:34 2012 us=46547 Initialization Sequence Completed
----------------------------------------------------------------------
When i´m connecting to TCP and using the verbose-level 7, i´m receiving many messages of those:
-----------------------------------------------------------------------
...MULTI: REAP RANGE 96 --> 112...
and further combinations of xx --> xx
------------------------------------------------------------------------
Client-Log:
-----------------------------------------------------------------------
Wed Aug 22 13:18:56 2012 us=637000 OpenVPN 2.1.1 i686-pc-mingw32 [SSL] [LZO2] [PKCS11] built on Dec 11 2009
Wed Aug 22 13:18:56 2012 us=637000 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Aug 22 13:18:56 2012 us=824000 PRNG init md=SHA1 size=36
Wed Aug 22 13:18:56 2012 us=824000 LZO compression initialized
Wed Aug 22 13:18:56 2012 us=824000 MTU DYNAMIC mtu=0, flags=1, 0 -> 140
Wed Aug 22 13:18:56 2012 us=824000 PID packet_id_init seq_backtrack=0 time_backtrack=0
Wed Aug 22 13:18:56 2012 us=824000 PID packet_id_init seq_backtrack=0 time_backtrack=0
Wed Aug 22 13:18:56 2012 us=824000 PID packet_id_init seq_backtrack=0 time_backtrack=0
Wed Aug 22 13:18:56 2012 us=824000 PID packet_id_init seq_backtrack=0 time_backtrack=0
Wed Aug 22 13:18:56 2012 us=824000 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Wed Aug 22 13:18:56 2012 us=824000 MTU DYNAMIC mtu=1450, flags=2, 1544 -> 1450
Wed Aug 22 13:18:56 2012 us=824000 RESOLVE_REMOTE flags=0x0101 phase=1 rrs=0 sig=-1 status=1
Wed Aug 22 13:18:56 2012 us=824000 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Aug 22 13:18:56 2012 us=824000 Local Options String: 'V4,dev-type tun,link-mtu 1544,tun-mtu 1500,proto TCPv4_CLIENT,comp-lzo,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-client'
Wed Aug 22 13:18:56 2012 us=824000 Expected Remote Options String: 'V4,dev-type tun,link-mtu 1544,tun-mtu 1500,proto TCPv4_SERVER,comp-lzo,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-server'
Wed Aug 22 13:18:56 2012 us=824000 Local Options hash (VER=V4): '69109d17'
Wed Aug 22 13:18:56 2012 us=824000 Expected Remote Options hash (VER=V4): 'c0103fa8'
Wed Aug 22 13:18:56 2012 us=824000 Attempting to establish TCP connection with xxx.xxx.xxx.xxx:1194
Wed Aug 22 13:18:56 2012 us=902000 TCP connection established with xxx.xxx.xxx.xxx:1194
Wed Aug 22 13:18:56 2012 us=902000 Socket Buffers: R=[8192->8192] S=[8192->8192]
Wed Aug 22 13:18:56 2012 us=902000 TCPv4_CLIENT link local: [undef]
Wed Aug 22 13:18:56 2012 us=902000 TCPv4_CLIENT link remote: xxx.xxx.xxx.xxx:1194
Wed Aug 22 13:18:56 2012 us=902000 TCPv4_CLIENT WRITE [14] to xxx.xxx.xxx.xxx:1194: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 [ ] pid=0 DATA len=0
Wed Aug 22 13:18:58 2012 us=150000 TCPv4_CLIENT WRITE [14] to xxx.xxx.xxx.xxx:1194: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 [ ] pid=0 DATA len=0
Wed Aug 22 13:19:00 2012 us=646000 TCPv4_CLIENT WRITE [14] to xxx.xxx.xxx.xxx:1194: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 [ ] pid=0 DATA len=0
...
Wed Aug 22 13:19:50 2012 us=644000 TCPv4_CLIENT WRITE [14] to xxx.xxx.xxx.xxx:1194: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 [ ] pid=0 DATA len=0
Wed Aug 22 13:19:53 2012 us=171000 TCPv4_CLIENT WRITE [14] to xxx.xxx.xxx.xxx:1194: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 [ ] pid=0 DATA len=0
Wed Aug 22 13:19:55 2012 us=699000 TCPv4_CLIENT WRITE [14] to xxx.xxx.xxx.xxx:1194: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 [ ] pid=0 DATA len=0
Wed Aug 22 13:19:56 2012 us=962000 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Wed Aug 22 13:19:56 2012 us=962000 TLS Error: TLS handshake failed
-----------------------------------------------------------------------
Please ignore the timedifference between server-log and client-log, those messages are always the same!
I actually don´t understand why a connection can´t be established over TCP, but over UDP in seconds!
On the Serverlog, on verbose-level 5 it looks like, that the connection doesn´t reach the server..
On the Serverlog, on verbose-level 7 it looks like, that the connection reaches the server, but ends in a loop or something else.
Is there an option or a hint which needs to pay attention for?
Thank you for your help.
Best regards..