How to re-resolve DNS for Wireguard on Alpine Linux

In our previous post How to automatically re-resolve DNS in Wireguard on Linux we explored how to use the reresolve-dns.sh script that is included with wireguard-tools on Ubuntu to re-resolve DNS entries in wireguard config files.

Add the following to the root crontab using crontab -e:

*       *       *       *       *       /usr/local/bin/reresolve-dns.sh /etc/wireguard/mywg.conf

You need to add this for every wireguard config (mywg.conf for this example).