Jump to content
  • 0

Wireguard - ReResolve DNS Endpoint


foschi

Question

Hello everyone.

The endpoint field in the peer of the WireGuard connection allows the insertion of a domain name, however this is resolved in the IP address only to the activation of the connection.
The following code by Jason A. Donenfeld (Creator of WireGuard) was created to allow you to avoid doing off+on in the event that peer has changed IP address.

https://github.com/WireGuard/wireguard-tools/blob/master/contrib/reresolve-dns/reresolve-dns.sh


Is it expected to be implemented in the future? Please do it otherwise I have to try to do it custom to make my Speedster capable of detecting the change of IP address and trying to restore the connection with peer, in this way it is useful to use the domain name and make sense.

Thank you!

Edited by foschi
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
В 27.07.2024 в 21:15, foschi сказал:

Hello everyone.

The endpoint field in the peer of the WireGuard connection allows the insertion of a domain name, however this is resolved in the IP address only to the activation of the connection.
The following code by Jason A. Donenfeld (Creator of Wiregarded) was created to allow you to avoid doing off+on in the event that peer has changed IP address.

https://github.com/WireGuard/wireguard-tools/blob/master/contrib/reresolve-dns/reresolve-dns.sh


Is it expected to be implemented in the future? Please do it otherwise I have to try to do it custom to make my Speedster capable of detecting the change of IP address and trying to restore the connection with peer, in this way it is useful to use the domain name and make sense.

Thank you!

Hello.

Our userspace code has nothing in common with the original Donenfeld's code. We implemented it by scratch, and of course we support reresolving in case of connection termination (or restart by the command of a user).

For better experience feel free to try version 4.2.

Link to comment
Share on other sites

  • 0
Posted (edited)
On 7/30/2024 at 2:27 PM, Le ecureuil said:

Hello.

Our userspace code has nothing in common with the original Donenfeld's code. We implemented it by scratch, and of course we support reresolving in case of connection termination (or restart by the command of a user).

For better experience feel free to try version 4.2.

Thanks for the reply.

How long does the process take to re-resolve DNS after the 'not connected' event?


image.png.0f7b61c96ce3b6d0a14b8bf3f50204c2.png

The TTL of the FQDN's DNS record is not the problem here.

If i switch with the status button to off and on again, it works:

image.png.c89d2ce36fa6877b6d42c142460b0305.png

Thank you.

 

Edited by foschi
Link to comment
Share on other sites

  • 0
В 19.08.2024 в 20:25, foschi сказал:

hi @Le ecureuil, can you give me feedback?

I suppose it's better to write to support and to receive guaranteed answer.

If you want to proceed here at your risk:

please enable
interface Wireguard0 debug

then save it:

system configuration save

and then download the self-test file at the moment when wireguard doesn't work.

The file you can send to me in the direct messages.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...