client connecting but cannot reconnect

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
dlugasny
OpenVpn Newbie
Posts: 1
Joined: Sun May 02, 2021 10:26 am

client connecting but cannot reconnect

Post by dlugasny » Sun May 02, 2021 10:32 am

Hi,

maybe some one will be able to help me.

I have VPN Server which is working. I`m able to establish one connection , but when I try to reconnect my client (Android or Windows) then client returning that error:
Sun May 02 12:29:24 2021 Socket Buffers: R=[65536->65536] S=[65536->65536]
Sun May 02 12:29:24 2021 UDP link local: (not bound)
Sun May 02 12:29:24 2021 UDP link remote: [AF_INET]46.41.137.80:1194
Sun May 02 12:29:24 2021 MANAGEMENT: >STATE:1619951364,WAIT,,,,,,
After server restart, client will be able to reconnect. Where is the problem in my configuration ?
Which parameter is missing ?

My server.conf:
port 1194
proto udp
dev tun
user nobody
group nogroup
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key
crl-verify crl.pem
ca ca.crt
cert server_OUIZVyamy7STmmYo.crt
key server_OUIZVyamy7STmmYo.key
auth SHA256
cipher AES-128-GCM
ncp-ciphers AES-128-GCM
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
client-config-dir /etc/openvpn/ccd
status /var/log/openvpn/status.log
client-to-client
verb 3
Thanks in advance for any hints.

Dlugasny

AdrianPortas
OpenVpn Newbie
Posts: 2
Joined: Thu May 06, 2021 7:17 am

Re: client connecting but cannot reconnect

Post by AdrianPortas » Thu May 06, 2021 7:50 am

Hi,

I had a problem with reconnection last week. I only could reconnect if I "disconnect" first and then "connect" but couldnt "reconnect" directly.

I fixed it with "lport 0" in the client configuration.

Regards, Adrian.

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

Re: client connecting but cannot reconnect

Post by TinCanTech » Thu May 06, 2021 10:39 am

You need --nobind instead.

Post Reply