Nyr / wireguard-install

WireGuard road warrior installer for Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wireguard doesn't work after a power outage

lmgr1992 opened this issue · comments

As the title says, my Wireguard VPN stopped working correctly after a power outage of several hours.

I must admit that I am a complete novice when it comes to networks or VPNs. I installed my Wireguard in a Proxmox container using wireguard-install script that got everything configured in a few minutes.
I've been investigating and I suspect that my problems are due to the Endpoint... That refers to my public IP right? Well, after the power outage, that IP must have changed to another one since the ENDPOINT that appears there (wg0.conf) has nothing to do with my current public IP.

Is there a way to change my endpoint? Without having to delete my client or create a new one.
I ask this here because it seems like your script leaves everything configured in a certain way and I'm afraid of breaking it even more if I modify something .

commented

This installer is not really designed for environments with a dynamic IP address.

You need to edit the iptables or firewalld rules depending on your firewall. If you use Debian/Ubuntu, they are usually here:
/etc/systemd/system/wg-iptables.service

If you IP address changes frequently, you can use MASQUERADE instead of the default SNAT rules.

/etc/wireguard/wg0.conf only needs to be edited if you want to create new clients.