Wrong IP in OpenVPN Profile for Multi-Server Setup

Hello everyone,

I’m currently setting up a multi-server OpenVPN deployment using Pritunl (free version) and have encountered an issue where the generated OpenVPN profile always contains the main server’s IP instead of the correct one assigned to the user’s organization.

Setup Details:
I have two servers with different public IPs (Using ‘Bind Address’ setting to set the IP).
I created two organizations, each assigned to a different server.
Each organization has one user.
The goal is for users to connect to their assigned VPN server, not the other one.

Issue:
The OpenVPN profile (.ovpn file) generated for the second server contains the IP address of the first/main server instead of the correct public IP of the second server.
Even though the organizations are assigned separately to their respective servers, the second user’s profile still references the first server’s IP in the remote field.
This results in being unable to connect without manually editing the .ovpn file.
Manually editing the .ovpn file to use the correct IP allows the connection to work, but the IP shown in https://whatismyip.com/ is the main server IP.

Configuration:
I am using AlmaLinux 9.5 (Teal Serval)
my /etc/sysconfig/network-scripts/ifcfg-eth0:

AUTOCONNECT_PRIORITY=999
BOOTPROTO=none
DEFROUTE=yes
DEVICE=eth0
GATEWAY=xx.xx.xx.129
HWADDR=de:3d:c7:cd:04:b0
IPADDR=xx.xx.xx.250
NETMASK=255.255.255.128
IPADDR2=xx.xx.xx.251
NETMASK2=255.255.255.128
ONBOOT=yes
TYPE=Ethernet
USERCTL=no

Don’t know if its related, but I added the second IP after I already installed pritunl

Any help would be greatly appreciated! Thanks in advance.

There can only be one host address which would be set in the top right settings. That is the address that is used for the client configuration.

Okay but it doesn’t work unless I change the IP in the .ovpn file to the secondary IP which is not the host address. When I do change it only then it connects with the host IP shown in https://whatismyip.com
How does that even make sense?

There just isn’t support for multiple host addresses in the configuration. The configuration file will always contain the host address as set in the top right settings.

But there is support for multiple IPs right?
I don’t care what IP shows in the configuration, it just does not work.
server 1 with host IP works fine
server 2 with secondary IP does not connect

There isn’t support for multiple IP addresses on one host. It is possible to do some configurations with multiple public IP addresses but it may require custom iptables configurations.