WireGuard - Experimental support for connecting via FQDN not IP

  • Regular ConnMan contributor and SailfishOS maintainer Jussi Laakonen has been working on improvements to WireGuard support in ConnMan. Specifically, the ability to define 'Host' (the remote WireGuard server) as a hostname/FQDN instead of an IP address. This eases long-term WireGuard use with servers self-hosted from dynamic IP address ranges, and commercial WireGuard services where each node has multiple IP addresses in DNS that are rotated reguarly to avoid IP blocking. The changes should also perform periodic re-resolving of the connection hostname to ensure connectivity is maintained when an IP changes. However, I can't test that as my own WireGuard server is on a static address, so we'd like to crowdsource some further testing :)

    The following image for RPi5 contains the changes:

    RPi5: https://chewitt.libreelec.tv/testing/LibreE…h64-12.80.0.tar

    To test, update to the test image then edit your WireGuard .config file to define 'Host' with a hostname/FQDN then reboot. On reboot check the WireGuard connection is up and that traffic is routed down the tunnel by running curl icanhazip.com .. it should return the WAN address of the remote side.

    For reference, Jussi's changes can be seen here: https://github.com/LaakkonenJussi…pn_association/ and I've build the LE image with this change: https://github.com/chewitt/LibreE…0a2da07a27919da.

    EDIT, the RPi5 image in my test share will be updated as other changes/refinements are made to Jussi's codebase upstream. You will need to check commits in https://github.com/chewitt/LibreELEC.tv/commits/rpi-13.0 for latest githash/changes to build with LE.

  • heya! this sounds great, and something i need, since i only have a server without a static IP, but i also don't have a pi5 - only a pi4. i haven't had time yet, but i guess there's only minor differences between the pi4 and pi5 images? i will try to copy the fat partition configs/dtbs from the stable pi4 image to the one you posted. and let you know how it works.
    i assume as well that connman generates a stable service name from an FQDN peer, rather than the current config name which encodes the peer's static IP?
    also i assume that i will still need some sort of a script to periodically restart the connection in order to continue to stay connected when my peer's IP cycles?
    thank you!