Just grab tailscale-hosts.sh
, chmod +x
it and go.
tailscale-hosts.sh [--suffix SUFFIX] [-o FILE]
Setup a cronjob to run this periodically:
# Update tailscale hosts file ever hour
0 * * * * /usr/bin/tailscale-hosts.sh --suffix wg --output /tmp/hosts.tailscale
Now you can point your DNS server to the new file.
For a Turris Omnia:
uci add_list resolver.kresd.hostname_config=/tmp/hosts.tailscale
uci commit resolver
/etc/init.d/resolver restart