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.12k stars 1.32k forks source link

Changing Port for existing client #325

Closed dzvision closed 2 years ago

dzvision commented 2 years ago

Currently, We are setup the port first, and add client. If the company firewall block the port, even if you add a new client, it is using the same port. I was wondering if we can directly change the port of existing client instead of using workaround.

Expect:

./wireguard-install.sh What do you want to do? 1) Add a new user 2) Revoke existing user 3) Uninstall WireGuard 4) Change Port 5) Exit Select an option [1-5]: 4

Workaroud:

Change the port in

sudo nano /etc/wireguard/wg0.conf

then restart WireGuard:

sudo systemctl restart wg-quick@wg0.service

Reference: https://www.digitalocean.com/community/tutorials/how-to-set-up-wireguard-on-ubuntu-20-04