WireGuard / wireguard-vyatta-ubnt

WireGuard for Ubiquiti Devices
https://www.wireguard.com/
GNU General Public License v3.0
1.45k stars 68 forks source link

Second Wireguard Tunnel uses wrong endpoint #116

Open pr0j3ctx opened 2 years ago

pr0j3ctx commented 2 years ago

Hello,

Package version

1.0.20211208

Firmware version

2.0.9 Hotfix 2

Device

EdgeRouter 4 / 6P / 12 - e300

Description

I am not sure if my problem is a Wireguard problem but I will explain my issue.

I have two DSL Connections. So I use two tunnels (wg221 and wg222) from ER-12 to my Debian Server. The Debian-Server listen on two ips. 54.1.1.1 and 54.1.1.2

wg221 10.0.0.0/30 Wg222 10.0.0.4/30

The ER-12 has two static routes. 54.1.1.41 via DSL1 54.1.1.42 via DSL2

When Tunnel restarts each one is connected over the right way. After some seconds the second Tunnel (wg222/DSL2) uses the Tunnel IPs from Tunnel 1 for connection.

Endpoint at ER-12 Tunnel 2 is now 10.0.0.1 and endpoint at Debian Server wg222 is 10.0.0.2

route-allowed-ips is set to false.

I have no idea why it comes to this issue.

Can anyone help me or has an idea to solve this issue?

Greats pr0

aldipower commented 7 months ago

You are not the only one! I am having the same problem. Got two tunnels on one machine, connecting to two other machines. For some reason, after a restart of the machine, the second tunnel shows the endpoint-connection configuration of the first tunnel. 'wg show wg1' shows the config of wg0 in the 'endpoint'-address section. But if I open the configuration of wg1 in an editor, everything is correct.

And, yeah, before the system restart it worked..