OpenWrt Additions

Setup DDNS - Cloudflare

opkg update
# install, scripts and LuCI app + ca-certificates to enable SSL, required by Cloudflare
opkg install ddns-scripts-cloudflare luci-app-ddns ca-certificates

Head over to Cloudflare Dashboard

  • Select your domain
  • Click the ‘Get your API Token’
  • Select the tab ‘API Tokens’
  • Click ‘Create Token’ button
  • Select template: ‘Edit zone DNS -> Use template’
  • Include -> Specific Zone -> '<your_domain>'
  • Then hit ‘Continue to summary’
  • Save the ‘API Token’ for later use
  • Create an A record pointing to some IP address, we’ll use example ‘subdomain.example.com’

Log out of LuCI then log back in

  • New tab ‘Services’ appears on top of the page
  • Hover over it and click ‘Dynamic DNS’
  • Delete the default entries and create a new one by hitting ‘Add new service…'
  • Choose a name, DDNS Service provider: ‘cloudflare.com-v4’ and hit ‘Create service’
  • Lookup Hostname: ‘subdomain.example.com’
  • Domain: subdomain@example.com
  • Username: ‘Bearer’
  • Password: '<api_token>'
  • Check Use ‘HTTP Secure’
  • Path to CA-Certificate: '/etc/ssl/certs’ then hit ‘Save’
  • Hit the ‘Save & Apply’ on the button then ‘Restart DDNS’ on the page

Should now have a working Cloudflare DDNS.

AdGuard Home

opkg update
opkg install adguardhome

# move adguardhome from tmp for persistent data after reboot
mkdir /usr/adguardhome
sed -i 's,/tmp/adguardhome,/usr/adguardhome,' /etc/init.d/adguardhome
service adguardhome restart

Configure dnsmasq DNS to listen on 5353

uci set dhcp.@dnsmasq[0].port="5353"
uci commit dhcp
service dnsmasq restart

Then browse to AdGuard Home and follow the setup wizard, choose to listen on :8000 for the admin interface on the br-lan interface and 53 for DNS.

AdGuard Home should now be working.


See also