Skip to content

Instantly share code, notes, and snippets.

@cubanlinux
Last active October 27, 2024 01:36
Show Gist options
  • Select an option

  • Save cubanlinux/718f88bcacc8a9df3dd9ff90ccb2d82b to your computer and use it in GitHub Desktop.

Select an option

Save cubanlinux/718f88bcacc8a9df3dd9ff90ccb2d82b to your computer and use it in GitHub Desktop.
Install AdguardDNS
docker run --name adguardhome\
--restart unless-stopped\
-v /my/own/workdir:/opt/adguardhome/work\
-v /my/own/confdir:/opt/adguardhome/conf\
-p 53:53/tcp -p 53:53/udp\
-p 67:67/udp -p 68:68/udp\
-p 80:80/tcp -p 443:443/tcp -p 443:443/udp -p 3000:3000/tcp\
-p 853:853/tcp\
-p 784:784/udp -p 853:853/udp -p 8853:8853/udp\
-p 5443:5443/tcp -p 5443:5443/udp\
-d adguard/adguardhome
Deactivate DNSStubListener and update the DNS server address. Create a new file,
mkdir /etc/systemd/resolved.conf.d
nano /etc/systemd/resolved.conf.d/adguardhome.conf
and add the following content to it:
[Resolve]
DNS=127.0.0.1
DNSStubListener=no
Specifying 127.0.0.1 as the DNS server address is necessary because otherwise the nameserver will be 127.0.0.53 which doesn't work without DNSStubListener.
Activate a new resolv.conf file:
mv /etc/resolv.conf /etc/resolv.conf.backup
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
Stop DNSStubListener:
systemctl reload-or-restart systemd-resolved
luego apuntamos el dns de cada dispositivo o servicio que queramos proteger de la publicidad o los malware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment