On Fri, Apr 12, 2024 at 10:55 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
You can always add set -x at the top and get a complete execution trace.
in the bash script?
https://github.com/WireGuard/wireguard-tools/blob/13f4ac4cb74b5a833fa7f825ba... and more importantly I would like to understand where and how that bash script? or what part does actually resolve the dns name of my changing dyndns stuff It does not. "wg set ... endpoint $ENDPONT" does DNS lookup on the $ENDPOINT value. Did you check what address
okay so that actual line with the variable $ENDPOINT then takes my dyndns hostname from the wg0.conf file and does then at the moment of that call do a dns lookup and thus then takes the then-current value and sets it as endpoint, right?
ping your.dns.name is using? Does it change when your address changes? Does it match what you see in "wg show" output?
no it doesnt match, as I have stated. I am logged into the one machine (opensuse, ssh) and i check there. the commands e.g. host and nslookup my-dyndns-hostname eventually changes within a few minutes after the machine on the far side has reestablished into the internet and updates (ddclient) the hostname. so the essential basic steps are all in place. I can also reach both places via ssh and their then current ip addresses obviously. these fundamental steps are working. my trouble is that wg show on the one machine that is left running (I shut down the wg device on the other machine intentionally so that no wg packets cause a re-establishing of the wg tunnel) "forever" shows the old address in wg show, the old address of the other distant side, the old ip address of the dyndns hostname of the distant side, even though at the same time a resolve on the ssh/bash/terminal already shows that it can and does resolve the updated dyndns hostname properly and that this ip address has changed etc. I like waited for an hour in this situation just to be patient. then i issued a systemctl restart wg-quick@wg0.service (or so) and it immediately updates the resolved hostname in the endpoint (wg show) to the proper current updated dyndns hostname of the far side. no actual connection will be established, as I have stated above, I did shut down the far side (other machine) wg tunnel. when I then restart the wg service on the far side machine as well, the whole tunnel comes alive. thats how I try to diagnose and narrow things down. i want to get this re-resolve stuff working. apparently somethings amiss here on opensuse leap 15.5 thanks for helping.