AdGuardDNS4Magisk

Rom, TukangM

Magisk
2.7f
Version
22.64 KB
Size
Mar 15, 2023
Updated

Module Info

  • Source Code View Repository
  • Tags
    #AdGuardDNS4Magisk #AdGuard #DNS #Magisk Module #Ad Blocking #Network #Privacy

About this module

AdGuardDNS4Magisk sends your phone's DNS lookups to AdGuard DNS (94.140.14.14 and 94.140.15.15), which blocks ads and trackers at the DNS level. It's a fork of xerta555's CloudflareDNS4Magisk, and its module.prop credits Rom and TukangM.

What the scripts do

  • service.sh adds iptables NAT rules that redirect outgoing port 53 traffic: TCP to 94.140.14.14 and UDP to 94.140.15.15.
  • post-fs-data.sh uses resetprop to set DNS properties such as net.dns1 and net.rmnet0.dns1.
  • If your ROM has /system/etc/resolv.conf, it also writes the AdGuard servers to a systemless copy of that file.

Limits

  • It only catches plain DNS on port 53. Encrypted DNS, such as Android's Private DNS or a browser's secure DNS setting, skips these rules.
  • The redirect covers IPv4 only.
  • The README warns that your network provider can block requests to custom DNS servers.
  • All your DNS lookups go to AdGuard, so install it only if you trust them.
  • The latest release is v2.7f from March 2023.

Install and remove

You need Magisk v17 or newer. Flash the zip in Magisk and restart. To undo it, remove the module and restart again, which also clears the iptables rules.