OpenVPN clients with multiple IPs

Started by cyberfarer, December 19, 2025, 09:43:39 PM

Previous topic - Next topic
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.