MirrorNest
← Todas las guías

Pi-hole

A free, open-source network-wide DNS sinkhole that blocks ads and trackers for every device on your network at the DNS level -- no per-device app or browser extension needed.

Sistema: Any Docker hostNetworkingDNSSitio oficial ↗Documentación oficial ↗
Esta guía se elaboró a partir de la documentación oficial de Pi-hole, enlazada arriba — verifica siempre ahí los nombres exactos de paquetes/versiones antes de ejecutar estos comandos en un servidor de producción, ya que las versiones de la distribución y del proyecto cambian con el tiempo.
  1. 1Run the Pi-hole container

    docker run -d \ --name pihole \ --restart unless-stopped \ -e TZ="Etc/UTC" \ -e FTLCONF_webserver_api_password="changeme" \ -v /my/own/pihole-etc:/etc/pihole \ -p 53:53/tcp -p 53:53/udp \ -p 80:80/tcp \ --dns=127.0.0.1 --dns=1.1.1.1 \ pihole/pihole:latest

    Port 53 must be free on the host -- disable systemd-resolved's stub listener first if it's already bound (common on Ubuntu). Replace "changeme" with a real admin password.

  2. 2Open the admin UI

    http://<the-server's-ip>/admin
  3. 3Point your router (or individual devices) at it

    For network-wide blocking, set this server's IP as the DNS server in your router's DHCP settings -- every device on the network then picks it up automatically. To test on one device first, set that device's DNS manually instead.