Automated Lookup of Endpoint Domain for Wireguard Peer

Hello Folks,

I use RUT9XX_R_00.06.09.5 because I have Legacy RUT955 device.
I got a Wireguard site2site peer running with using the wireguard component which I installed extra by the System Package Manager (GUI).

Now my problem is, that the endpoint of my wireguard peer, has a dynamic ip-address.

I would be able to update the wireguard config automated regularly by a script with the new static ip of the endpoint, but I cannot locate the config on my router. Can someone tell the wg_config,path? Or does someone has another idea?

Best regards

Can you use DDNS and a FQDN as the endpoint? … you can on later FW versions. Note that it’ll have to be a Public IP for this to work.

Hello,
The config is in /etc/config/network. A Mike wrote above, use a dyndns and when the IP address changes it can be updated by /usr/bin/wireguard_watchdog. Look at the content of the script to see how to put it to work using cron.

Regards,

So my Endpoint has already DDNS/FQDN. The Thing is, once I put in the domain in the wireguard config, it automatically gets resolved and saved as a static ip in the wg.conf.

So as @flebourse described, wireguard_watchdog should be able to resolve the Domain regularly (via cron) and write the changed ipv4 in the wg.conf? does the watchdog also restart wireguard so that the new ip will be used?

wireguard_watchdog will do all the required housekeeping for you.

This topic was automatically closed after 15 days. New replies are no longer allowed.