Usando Pihole sobre Nginx

A continuación vamos a hacer que Pihole use Nginx en vez de Lighttpd, para ello debemos empezar instalando Nginx y Php7.3-fpm:

apt-get install nginx
apt-get install php7.3-fpm

Creamos el fichero de configuración de Pihole en /etc/nginx/sites-available con la siguiente información:

Sigue leyendo “Usando Pihole sobre Nginx”

Youtube Ads Blocker 3.0 for Pihole 5.0

The brand new version of Pihole 5.0 has deleted the following files:

gravity.list,black.list,whitelist.txt

And has created for all these data a new SQLite3 database:

/etc/pihole/gravity.db

With this change, all the previous versions to 3.0 of the script that I made to block the YouTube Advertisement, has stopped working. So I have created a new version in order to handle that new SQLite database.

Sigue leyendo “Youtube Ads Blocker 3.0 for Pihole 5.0”

Youtube Ads Blocker 3.0 para Pihole 5.0

La nueva versión de Pihole 5.0 ha eliminado los siguiente ficheros:

gravity.list,black.list,whitelist.txt

Y ha generado para todo esto una pequeña base de datos en SQLite3:

/etc/pihole/gravity.db

Con esto, todas las versiones anteriores a la 3.0 del Script que hice para bloquear anuncios en Youtube, han dejado de funcionar. Por lo que he generado una nueva versión que se conecta contra la pequeña base de datos SQLite y es completamente compatible, realizando el mismo proceso de inserción de subdominios de Googlevideo.

Sigue leyendo “Youtube Ads Blocker 3.0 para Pihole 5.0”

A Centreon/Nagios Plugin for the Pi-hole API

This morning i found out that Pi-hole has an small API and can be called from the endpoint: admin/api.php? so i decided to create an small plugin for Centreon/Nagios in order to extract (almost) all the information possible that can be graphed

  • Number of DNS queries in a day.
  • Number and percentage of ads blocked.
  • Number of clients using Pi-hole as their DNS server.
  • Number of queries classified by IPv4, IPv6, PTR, SRV, etc…

The API is quite limited so i could not do too much. The following are some graphs that I am getting now using the plugin.

Sigue leyendo “A Centreon/Nagios Plugin for the Pi-hole API”

Bash Script to Block Youtube advertisements in Pi-hole

Image 1. Pi-Hole and Raspberry Pi

I have been using the Raspberry Pi with Pi-hole, and to be honest I could not be happier, Pi-hole has been working with non-stop since then. Nowadays, the only problem i have found is that it is almost impossible to block the Youtube advertisements. So I decide to do a research on this, and found that Google is generating subdomains for each ad with following format:

Sigue leyendo “Bash Script to Block Youtube advertisements in Pi-hole”