complexorganizations / wireguard-manager

✔️ WireGuard-Manager is an innovative tool designed to streamline the deployment and management of WireGuard VPNs. Emphasizing user-friendliness and security, it simplifies the complexities of VPN configuration, offering a robust yet accessible solution for both personal and professional use.
Other
1.59k stars 203 forks source link

Wrong MTU in Client's Configuration #361

Open Gill-Bates opened 1 year ago

Gill-Bates commented 1 year ago

When adding a new Client, the MTU will be replaced by the IPv6 address which will cause in a invalid Wireguard-Configuration.

# https://www.wireguard.com
[Interface]
Address = 10.10.0.3/24,fd00:00:00::3/8
DNS = 10.10.0.1,
ListenPort = 10871
MTU = fd00::1
PrivateKey = ***
[Peer]
AllowedIPs = 25
Endpoint = ***
PersistentKeepalive = 1280
PresharedKey = ***
PublicKey = ***

My wg0.conf:

# 10.10.0.0/24 fd00:00:00::0/8 *** *** 10.10.0.1, fd00::1 1280 25 0.0.0.0/0,::/0
[Interface]
Address = 10.10.0.1/24,fd00:00:00::1/8
ListenPort = 4500
MTU = 1420
PrivateKey = ***
PostUp = sysctl --write net.ipv4.ip_forward=1; sysctl --write net.ipv6.conf.all.forwarding=1; nft add table inet wireguard-wg0; nft add chain inet wireguard-wg0 PREROUTING {type nat hook prerouting priority 0\;}; nft add chain inet wireguard-wg0 POSTROUTING {type nat hook postrouting priority 100\;}; nft add rule inet wireguard-wg0 POSTROUTING ip saddr 10.10.0.0/24 oifname eth0 masquerade; nft add rule inet wireguard-wg0 POSTROUTING ip6 saddr fd00:00:00::0/8 oifname eth0 masquerade
PostDown = sysctl --write net.ipv4.ip_forward=0; sysctl --write net.ipv6.conf.all.forwarding=0; nft delete table inet wireguard-wg0
SaveConfig = false
Rebelllious commented 1 year ago

How can this be reproduced? Can you share the steps? Also, distro and version info would be helpful. I have several test servers and have not seen anything similar.

Prajwal-Koirala commented 7 months ago

I believe this issue has been resolved. It appears to be working as expected in the latest build.