2.5.2 - UDP and local 0.0.0.0 not working

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
danci1973
OpenVpn Newbie
Posts: 4
Joined: Mon Sep 21, 2020 7:47 pm

2.5.2 - UDP and local 0.0.0.0 not working

Post by danci1973 » Wed May 12, 2021 6:53 pm

Hello,

I noticed that if I don't set --local option to a specific IP on the server (Linux), OpenVPN 2.5.2 server doesn't work with UDP - I can see that the client connects, but then it just times out:

Code: Select all

May 12 19:15:16 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 Re-using SSL/TLS context
May 12 19:15:16 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 Control Channel MTU parms [ L:1621 D:1212 EF:38 EB:0 ET:0 EL:3 ]
May 12 19:15:16 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 Data Channel MTU parms [ L:1621 D:1450 EF:121 EB:406 ET:0 EL:3 ]
May 12 19:15:16 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 Local Options String (VER=V4): 'V4,dev-type tun,link-mtu 1541,tun-mtu 1500,proto UDPv4,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-server'
May 12 19:15:16 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 Expected Remote Options String (VER=V4): 'V4,dev-type tun,link-mtu 1541,tun-mtu 1500,proto UDPv4,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-client'
May 12 19:15:16 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 UDPv4 READ [14] from [AF_INET]xxx.xxx.xxx.xxx:53566: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 [ ] pid=0 DATA len=0
May 12 19:15:16 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 TLS: Initial packet from [AF_INET]xxx.xxx.xxx.xxx:53566, sid=559aaabf fd5b7415
May 12 19:15:16 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 UDPv4 WRITE [26] to [AF_INET]xxx.xxx.xxx.xxx:53566: P_CONTROL_HARD_RESET_SERVER_V2 kid=0 [ 0 ] pid=0 DATA len=0
May 12 19:15:18 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 UDPv4 READ [14] from [AF_INET]xxx.xxx.xxx.xxx:53566: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 [ ] pid=0 DATA len=0
May 12 19:15:18 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 UDPv4 WRITE [26] to [AF_INET]xxx.xxx.xxx.xxx:53566: P_CONTROL_HARD_RESET_SERVER_V2 kid=0 [ 0 ] pid=0 DATA len=0
May 12 19:15:22 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 UDPv4 WRITE [14] to [AF_INET]xxx.xxx.xxx.xxx:53566: P_CONTROL_HARD_RESET_SERVER_V2 kid=0 [ ] pid=0 DATA len=0
May 12 19:15:22 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 UDPv4 READ [14] from [AF_INET]xxx.xxx.xxx.xxx:53566: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 [ ] pid=0 DATA len=0
May 12 19:15:22 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 UDPv4 WRITE [22] to [AF_INET]xxx.xxx.xxx.xxx:53566: P_ACK_V1 kid=0 [ 0 ]
May 12 19:15:30 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 UDPv4 READ [14] from [AF_INET]xxx.xxx.xxx.xxx:53566: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 [ ] pid=0 DATA len=0
May 12 19:15:30 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 UDPv4 WRITE [26] to [AF_INET]xxx.xxx.xxx.xxx:53566: P_CONTROL_HARD_RESET_SERVER_V2 kid=0 [ 0 ] pid=0 DATA len=0
May 12 19:15:45 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 UDPv4 READ [14] from [AF_INET]xxx.xxx.xxx.xxx:53566: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 [ ] pid=0 DATA len=0
May 12 19:15:45 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 UDPv4 WRITE [22] to [AF_INET]xxx.xxx.xxx.xxx:53566: P_ACK_V1 kid=0 [ 0 ]
May 12 19:15:47 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 UDPv4 WRITE [14] to [AF_INET]xxx.xxx.xxx.xxx:53566: P_CONTROL_HARD_RESET_SERVER_V2 kid=0 [ ] pid=0 DATA len=0
May 12 19:16:16 gw2 daemon.err openvpn[12735]: xxx.xxx.xxx.xxx:53566 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
May 12 19:16:16 gw2 daemon.err openvpn[12735]: xxx.xxx.xxx.xxx:53566 TLS Error: TLS handshake failed
May 12 19:16:16 gw2 daemon.notice openvpn[12735]: xxx.xxx.xxx.xxx:53566 SIGUSR1[soft,tls-error] received, client-instance restarting
But as soon as I set --local to one of the IP addresses the server has, it starts working...

I couldn't find anything like that mentioned in the docs, so is it a bug or am I missing something?


Regards,
Danilo

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: 2.5.2 - UDP and local 0.0.0.0 not working

Post by TinCanTech » Wed May 12, 2021 6:58 pm

You are missing something.

danci1973
OpenVpn Newbie
Posts: 4
Joined: Mon Sep 21, 2020 7:47 pm

Re: 2.5.2 - UDP and local 0.0.0.0 not working

Post by danci1973 » Thu May 13, 2021 7:47 pm

TinCanTech wrote:
Wed May 12, 2021 6:58 pm
You are missing something.
Thank you, that's really good to know. :lol:

Post Reply