angristan / wireguard-install

WireGuard VPN installer for Linux servers
https://stanislas.blog/2019/01/how-to-setup-vpn-server-wireguard-nat-ipv6/
MIT License
8.1k stars 1.31k forks source link

Checking for an existing clients address does not work. Wrong subnet mask in verifying section #371

Closed alekskomp closed 1 year ago

alekskomp commented 1 year ago

Hello. Verifying section contains /24 mask for ipv4 and /64 mask for ipv6 https://github.com/angristan/wireguard-install/blob/193fe396a18682c0c90684f03af0efed5043e2a2/wireguard-install.sh#L259 https://github.com/angristan/wireguard-install/blob/193fe396a18682c0c90684f03af0efed5043e2a2/wireguard-install.sh#L272 But client is added with a different mask. /32 for ipv4 and /128 for ipv6 https://github.com/angristan/wireguard-install/blob/193fe396a18682c0c90684f03af0efed5043e2a2/wireguard-install.sh#L320 So checking an existing address does not work. Fix it please.