Hostname wireguard prob

Been using wireguard on openwrt sometime now. Almost all is working except for endpoint in hostname form. When using ipv4 adress it works, but if I use the hostname the provider has given me it wont connect to the wireguard. Limitation in wireguard on openwrt or my fault?

Thu Sep  3 14:45:34 2020 daemon.notice netifd: WGinterface (5664): Try again: `hostname:port'. Trying again in 1.00 seconds...
Thu Sep  3 14:45:40 2020 daemon.notice netifd: WGinterface (5664): Try again: `hostname:port'. Trying again in 1.20 seconds...
Thu Sep  3 14:45:46 2020 daemon.notice netifd: WGinterface (5664): Try again: `hostname:port'. Trying again in 1.44 seconds...
Thu Sep  3 14:45:53 2020 daemon.notice netifd: WGinterface (5664): Try again: `hostname:port''. Trying again in 1.73 seconds...
Thu Sep  3 14:46:00 2020 daemon.notice netifd: WGinterface (5664): Try again: `hostname:port'. Trying again in 2.07 seconds...
Thu Sep  3 14:46:07 2020 daemon.notice netifd: WGinterface (5664): Try again: `hostname:port'. Trying again in 2.49 seconds...

Most likely the address resolves to both IPv4 and IPv6, with the latter having precedence. You can verify with an nslookup.

2 Likes

spot on! IPv4 and IPv6!

You can use this code in dnsmasq configuration to return empty AAAA responses and regular A.

address=/example.com/::
server=/example.com/#
1 Like