Okay! Solved.
Here is what I did, with the provided information:
-
Flash my beagle again.
-
Install pihole again and fix the issues.
pihole -d
Okay, step by step. In my case, some red crosses would appear. I had three of them.
1: Port 53 is used, and it has to bee free for pihole. Who is using this port? Our lovely dnsmasq service, as pointed out by @Bucking_Horn. So, I uninstalled it.
sudo apt-get remove dnsmasq
And then, you'll see this:
[53] is in use by pihole-FTL
As is. Bye bye dnsmasq. Now it highlights the port 53 in green, indicating pihole is using it. YES!
2: Port 80 is used by nginx, and it has to bee freed as well. So I changed the port from 80 to 81, by changing all the "80"s by "81" in the following file:
sudo vi /etc/nginx/sites-enabled/default
Yes, now the port 80 is free, and 81 isn't.
[80] is in use by lighttpd
[80] is in use by lighttpd
*:81 nginx (IPv4)
*:81 nginx (IPv6)
3. DNS not working
Now my dashboard would load when navigating to the beagle IP, but the DNS would not work yet. As @Bucking_Horn pointed out (THANKS!), there is a file that interferes with the pihole DNS. So, get rid of it with:
sudo mv /etc/dnsmasq.d/SoftAp0 ~
Reboot the beagle, and works. It does not stop the youtube ads, yet, but works.
Thanks to @Bucking_Horn again for taking the time. Thank you very much.