User Tools

Site Tools


computing:piholeonblack

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:piholeonblack [2021/03/01 18:19] oemb1905computing:piholeonblack [2023/02/27 01:10] (current) oemb1905
Line 14: Line 14:
  
   sudo apt update   sudo apt update
-  sudo apt upgrade +  sudo apt dist-upgrade
-  sudo rm -rf /opt/*+
   sudo reboot   sudo reboot
 +  sudo rm -rf /opt/*
   sudo apt remove --purge nginx* nodejs* apache2*   sudo apt remove --purge nginx* nodejs* apache2*
   sudo apt autoremove   sudo apt autoremove
Line 35: Line 35:
   chown pihole:pihole /var/lib/misc/dnsmasq.leases     chown pihole:pihole /var/lib/misc/dnsmasq.leases  
   sudo nano /etc/dnsmasq.d/SoftAp0   sudo nano /etc/dnsmasq.d/SoftAp0
 +  #interface=usb0
 +  #interface=usb1
   #cache-size=2048   #cache-size=2048
   #dhcp-leasefile=/var/run/dnsmasq.leases   #dhcp-leasefile=/var/run/dnsmasq.leases
   sudo reboot   sudo reboot
  
-The next problem is that the Beagle Bone Black's network manager, connman, which is controlling both DNS/DHCP, is still installed and is starting on port 53 prior to the pihole-FTL.service, thus the pihole cannot start managing DNS since the port is already in use.  However, the pihole is now ready to take over DNS and the DHCP client settings for the device itself (not to be confused with using as a DHCP server). Thus, it is now safe to remove connman without having to configure /etc/interfaces or do anything else to dnsmasq since pihole will take care of both henceforward.+The next problem is that the Beagle Bone Black's network manager, connman, which is controlling both DNS/DHCP, is still installed and is starting on port 53 prior to the pihole-FTL.service, thus the pihole cannot start managing DNS since the port is already in use.  However, the pihole is now ready to take over DNS and the DHCP client settings for the device itself (not to be confused with using the pihole as a DHCP server). Thus, it is now safe to remove connman without having to configure /etc/interfaces or do anything else to dnsmasq since pihole will take care of both henceforward.
      
   sudo apt remove --purge connman   sudo apt remove --purge connman
-  sudo reboot+  sudo reboot [OR, if you don't have serial and/or lose connection, unplug and plug back in after 5-10]
      
-More than likely, the Beagle Bone Black will hang at around 20/30% of the removal, since it will have lost its dhcp client reservation.  Personally, I always have serial connected just in case, but if not, wait 3-minutes and then unplug and plug the device back in, and connman will be removed, and pihole-FTL.service will now be able to start and listen on port 53 and manage DNS requests, and the pihole will configure the device properly as a dhcp client underneath your router.  The next step is to configure your router DHCP server to utilize the pihole DNS for its clients.  In my case, I use openWRT so I go to Interfaces / LAN / DHCP Server / Advanced Settings.  In that area, you can specify what DNS the router should use:+More than likely, the Beagle Bone Black will hang at around 20/30% of the removal, since it will have lost its dhcp client reservation.  Personally, I always have serial connected just in case, but if not, wait 5-10 minutes and then unplug and plug the device back in, and connman will be removed, and pihole-FTL.service will now be able to start and listen on port 53 and manage DNS requests, and the pihole will configure the device properly as a dhcp client underneath your router.  The next step is to configure your router DHCP server to utilize the pihole DNS for its clients.  In my case, I use openWRT so I go to Interfaces / LAN / DHCP Server / Advanced Settings.  In that area, you can specify what DNS the router should use:
  
 {{ :computing:openwrt.png?direct&600 |}}    {{ :computing:openwrt.png?direct&600 |}}   
  
-Replace 6, 192.168.11.20 with your pihole's LAN address.  In my case, I instruct my router to issue a static local ip to the device (which pihole also recommends).  Once you complete this last step, restart the router.  Then, restart all of the clients on the LAN.  Lastly, to verify that the pihole DNS is in fact being used, use the admin GUI in your browser and navigate to Tools / Network, and ensure each device came back online using the pihole DNS.  Please note: Beagle Bone users specifically, will see an entry pihole device itself listed as not using the pihole's own DNS in red - this is because connman was not using the pihole DNS for the stage above.  You will see another more current entry for the pihole device itself indicating that it is now utilizing its own DNS.   +Replace 6, 192.168.11.20 with your pihole's LAN address.  In my case, I instruct my router to issue a static local ip to the device (which pihole also recommends).  Once you complete this last step, restart the router.  Then, restart all of the clients on the LAN.  Lastly, to verify that the pihole DNS is in fact being used, use the admin GUI in your browser and navigate to Tools / Network, and ensure each device came back online using the pihole DNS.  Please note: Beagle Bone users specifically, will see an entry pihole device itself listed as not using the pihole's own DNS in red - this is because connman was not using the pihole DNS for one of the stages above.  You will see another more current entry for the pihole device itself indicating that it is now utilizing its own DNS.
  
 Thanks to [[https://frdmtoplay.com/running-pi-hole-on-the-beagle-bone-black/|Freedom to Play]], [[https://bacnh.com/how-to-setup-pi-hole-with-openwrt/|Embedded Knowledge]], and Jared from [[https://gitlab.com/ABQLUG|ABQ GLUG]] for the idea to tinker with this. Thanks to [[https://frdmtoplay.com/running-pi-hole-on-the-beagle-bone-black/|Freedom to Play]], [[https://bacnh.com/how-to-setup-pi-hole-with-openwrt/|Embedded Knowledge]], and Jared from [[https://gitlab.com/ABQLUG|ABQ GLUG]] for the idea to tinker with this.
      
- --- //[[jonathan@haacksnetworking.com|oemb1905]] 2021/03/01 11:08//+ --- //[[jonathan@haacksnetworking.com|oemb1905]] 2021/10/27 11:17//
computing/piholeonblack.1614622752.txt.gz · Last modified: 2021/03/01 18:19 by oemb1905