[GH-ISSUE #868] Feature request: Automatic setup to work with multiple ip adresses on 1 VPS for wg and amneziawg #234

Open
opened 2026-10-13 20:16:18 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @shadowmardok on GitHub (Jun 26, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/868

Please, mylord, if it possible, can you add automatic setup server for multiple IP adresses at least for wireguard and amneziaWG.
I mean:
I have server with 1 dedicated IP address, installing amneziaWG on it, and after that i want to have possibility to install 2nd, 3rd etc IP address on it, and for each ip address i want to install amneziaWG too.
Ip on connection should be like
1 ip = 1ip
2 ip = 2ip
etc
Because now if im trying to connect with 2nd ip, ip checkers say that i have 1st ip.
If i understand correctly i should setup routes, but, i was sitting with GPT for some hours, and i couldn't find some files to configure.

Originally created by @shadowmardok on GitHub (Jun 26, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/868 Please, mylord, if it possible, can you add automatic setup server for multiple IP adresses at least for wireguard and amneziaWG. I mean: I have server with 1 dedicated IP address, installing amneziaWG on it, and after that i want to have possibility to install 2nd, 3rd etc IP address on it, and for each ip address i want to install amneziaWG too. Ip on connection should be like 1 ip = 1ip 2 ip = 2ip etc Because now if im trying to connect with 2nd ip, ip checkers say that i have 1st ip. If i understand correctly i should setup routes, but, i was sitting with GPT for some hours, and i couldn't find some files to configure.
Author
Owner

@ZheniaEU commented on GitHub (May 1, 2026):

I have the same use case.

My VPS has multiple public IPv4 addresses assigned to the same network interface. When I add the server in Amnezia using one IP, Amnezia installs and configures AmneziaWG normally. But when I try to add the same VPS again using the second public IP, Amnezia detects that it is already installed and reuses the existing setup.

From user perspective, I expected these public IPs to work as separate VPN endpoints.

What I would like to have is this:
public IP 1 goes to AmneziaWG endpoint/profile 1 and traffic exits via public IP 1
public IP 2 goes to AmneziaWG endpoint/profile 2 and traffic exits via public IP 2

Right now both IPs are treated as the same server installation, and traffic exits through the server default route unless I manually configure Linux routing and NAT.

I understand that this is technically one VPS, not two seperate servers, but it would be very useful if Amnezia supported this case from the UI.

For example, Amnezia could detect multiple public IPs on the same server, allow choosing which public IP an AmneziaWG profile or container should bind to, and automaticaly configure the correct outbound SNAT/source IP for that profile.

At the moment this seems possible only with manual netplan and iptables configuration. Also, if multiple generated profiles use the same internal VPN client IP, it becomes imposible to separate them cleanly with SNAT rules.

Could you please consider adding proper multi-public-IP support for AmneziaWG on a single VPS? I think this would be useful for many people who rent VPS servers with additional IPv4 addresses.

<!-- gh-comment-id:4358783482 --> @ZheniaEU commented on GitHub (May 1, 2026): I have the same use case. My VPS has multiple public IPv4 addresses assigned to the same network interface. When I add the server in Amnezia using one IP, Amnezia installs and configures AmneziaWG normally. But when I try to add the same VPS again using the second public IP, Amnezia detects that it is already installed and reuses the existing setup. From user perspective, I expected these public IPs to work as separate VPN endpoints. What I would like to have is this: public IP 1 goes to AmneziaWG endpoint/profile 1 and traffic exits via public IP 1 public IP 2 goes to AmneziaWG endpoint/profile 2 and traffic exits via public IP 2 Right now both IPs are treated as the same server installation, and traffic exits through the server default route unless I manually configure Linux routing and NAT. I understand that this is technically one VPS, not two seperate servers, but it would be very useful if Amnezia supported this case from the UI. For example, Amnezia could detect multiple public IPs on the same server, allow choosing which public IP an AmneziaWG profile or container should bind to, and automaticaly configure the correct outbound SNAT/source IP for that profile. At the moment this seems possible only with manual netplan and iptables configuration. Also, if multiple generated profiles use the same internal VPN client IP, it becomes imposible to separate them cleanly with SNAT rules. Could you please consider adding proper multi-public-IP support for AmneziaWG on a single VPS? I think this would be useful for many people who rent VPS servers with additional IPv4 addresses.
Author
Owner

@ZheniaEU commented on GitHub (May 1, 2026):

I also tested this manually on Ubuntu 24.04. It can be solved with netplan and iptables SNAT, but Amnezia does not manage this from the UI.
In my case, if both generated profiles use the same internal VPN client IP, SNAT rules cannot distinguish them.

<!-- gh-comment-id:4358791899 --> @ZheniaEU commented on GitHub (May 1, 2026): I also tested this manually on Ubuntu 24.04. It can be solved with netplan and iptables SNAT, but Amnezia does not manage this from the UI. In my case, if both generated profiles use the same internal VPN client IP, SNAT rules cannot distinguish them.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#234
No description provided.