Greetings
I am OpenVPN setup and the issue I am seeing is that users who connect and disconnect are issued a different IP. This is resulting in the same user having many IP addresses. See screenshot.
I have searched for this and set the option persist-ip but it hasn't changed anything.
Does anyone have a solution for this?
Thanks.
This behavior is normal with OpenVPN when clients use a dynamic address pool. persist-ip alone does not guarantee a fixed address per user; it only helps reuse addresses within the same server runtime and does not survive restarts or guarantee per-user consistency.
If you want the same user to always receive the same IP, you must use client-specific configuration (CCD) and assign the address explicitly with ifconfig-push, making sure that each user has a unique Common Name and that username-as-common-name is enabled if you authenticate via user/password. Alternatively, enable pool-persist with a persistent file so the server remembers past assignments across restarts, but this still does not strictly bind an IP to a specific user identity.
In short: what you see is expected, and the reliable solution is per-user static IP assignment via CCD, not persist-ip.
My other two cents. Wireguard is way more reliable, not so picky in configuration and as well way faster.
Thank you for your input. You're correct, this is normal behaviour and I was missing the problem to be solved which isn't a new IP address, but the frequent resets requiring a new IP. I found the problem in that OpenVPN, on my instance, which is a default install, did not have a default keep alive interval or timeout set. To set them, I had to enable "advanced" mode. Having set it, the issue is resolved.