Skip to content

Instantly share code, notes, and snippets.

@startergo
Last active December 18, 2023 01:32
Show Gist options
  • Save startergo/7b2e706fb710889a748d708e6dfdb3b2 to your computer and use it in GitHub Desktop.
Save startergo/7b2e706fb710889a748d708e6dfdb3b2 to your computer and use it in GitHub Desktop.
Adguard home on OpenWRT

Edit adguardhome.yaml.

nano /etc/adguardhome.yaml

Find:

dns:
  bind_hosts:
  • Make sure it is set as:
dns:
  bind_hosts:
  - 127.0.0.1
  - 192.168.1.1
  - ::1
  • Commit changes:
uci commit dhcp
/etc/init.d/dnsmasq restart
  • First entry is the local host
  • 2nd entry is the ipv4 router address
  • 3rd evtry is the ipv6 router address localhost
  • This will resolve the OpenWRT opkg update
  • NFT tables (firewall4):
nft add table nat
nft 'add chain nat prerouting { type nat hook prerouting priority -100; }'
nft add rule nat prerouting udp dport 53 ip saddr 192.168.1.0/24 dnat 192.168.1.1:53

https://forum.openwrt.org/t/howto-running-adguard-home-on-openwrt/51678?page=15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment