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 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/ /etc/wireguard/mywg.conf

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