Hello,
I'm using an OpenVPN Server with a IP-Persist config file and sometimes the same client gets a wrong IP after reconnect. I even use now "ifconfig-pool-persist /home/pi/openvpn/IP-Persist-Datei 0" so file is read only and should always be considered. Mostly the smartphone is affected because there occur a lot of reconnects within the same time. After I do a "sudo systemctl restart openvpn" on the server, IP addresses are assigned correctly again. I have no clue whats wrong. Hope you can help.
Server-Configuration:
log-append /home/pi/openvpn/OpenVPNServerUDP.log
server 192.168.123.0 255.255.255.0
tls-server
float
local 192.168.178.200
proto udp
port 1234
route 192.168.0.0 255.255.255.0
route 192.168.8.0 255.255.255.0
user openvpn #anlegen mit adduser --system --disabled-login --group --no-create-home --gecos "OpenVPN user" --shell /bin/false openvpn
persist-tun
persist-key
dev openvpnUDP
dev-type tun
topology net30
client-to-client
client-config-dir /home/pi/openvpn/client-config
writepid /home/pi/openvpn/openvpnUDP.pid
ifconfig-pool-persist /home/pi/openvpn/IP-Persist-Datei 0
ping-timer-rem
connect-retry 5 5
mssfix 1500
auth none
no-replay
status /home/pi/openvpn/StatusDatei.txt 60
status-version 1
management 127.0.0.1 10000
verify-client-cert require
ncp-disable
cipher AES-256-CBC
crl-verify /home/pi/openvpn/crl.pem
compress lz4
Client config dir file client1
iroute 192.168.8.0 255.255.255.0
iroute 192.168.0.0 255.255.255.0
#Diese müssen auch in der
ping 20
push "ping-restart 61"
push "route 192.168.178.0 255.255.255.0"
push "route 8.8.8.8 255.255.255.255"
ls -l IP-Persist-Datei
-rw-rw-rw- 1 openvpn pi 82 Aug 8 01:39 IP-Persist-Datei
client1,192.168.123.110
client2,192.168.123.78
client3,192.168.123.30
Client config file
log-append /home/pi/openvpn/vpn.log
tls-client
pull
float
remote YYYY
port 1234
proto udp4
connect-timeout 30
dev tun
nobind
remote-cert-tls server
cipher AES-256-CBC
auth none
no-replay
ncp-disable
compress lz4