[HOWTO] Install Pi-Hole

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [HOWTO] Install Pi-Hole

      For users that want to install Pi-Hole in his NAS.


      Usefull info, please read first:

      pi-hole.net/
      github.com/pi-hole/pi-hole/wiki/The-%22pihole%22-Command

      mediavida.com/foro/hard-soft/p…dad-tu-raspberrypi-553053


      STEPS:

      1 - open a shell

      2 - install curl:

      Source Code

      1. apt-get install curl



      3 - install pi-hole


      Source Code

      1. curl -sSL https://install.pi-hole.net | bash
      3.5 - Read question and answer yes apropiately.

      4 - done, you can test if is working using pihole command

      Source Code

      1. pihole status
      5 - finally you can change default password using command:

      Source Code

      1. pihole -a -p newpasswordhere


      And go to yourIP\admin to see if all works as expected.
      Files
      • 1.jpg

        (45.15 kB, downloaded 34 times, last: )
      • 2.jpg

        (48.92 kB, downloaded 31 times, last: )
      • 3.jpg

        (37.18 kB, downloaded 32 times, last: )
      • 4.jpg

        (26.37 kB, downloaded 33 times, last: )
      • 5.jpg

        (26.18 kB, downloaded 34 times, last: )
      • 6.jpg

        (22.01 kB, downloaded 32 times, last: )
      • 7.jpg

        (26.46 kB, downloaded 34 times, last: )
      • 8.jpg

        (42.32 kB, downloaded 38 times, last: )
      OMV 3.0.84 x64 on a HP T510, 32GB SSD 2,5" disk, 4 GB RAM, CPU VIA EDEN X2 U4200 is x64 at 1GHz

      Post: HPT510 SlimNAS ; HOWTO Install Pi-Hole ; HOWTO install MLDonkey ; HOHTO Install ZFS-Plugin ; OMV_OldGUI ; ShellinaBOX ;

      The post was edited 7 times, last by raulfg3: add info ().

    • To acces admin WEBGUI I use badda aproach:

      Pi-Hole - Network wide Ad blocking

      Pi-hole Admin Console - Mozilla Firefox.jpg


      So now I can acces to pihole admin on http:\\mynasIP:8080\admin


      but I want to access https:\\mynasIP\admin or https:\\mynasIP\pihole\admin

      what can i do?
      OMV 3.0.84 x64 on a HP T510, 32GB SSD 2,5" disk, 4 GB RAM, CPU VIA EDEN X2 U4200 is x64 at 1GHz

      Post: HPT510 SlimNAS ; HOWTO Install Pi-Hole ; HOWTO install MLDonkey ; HOHTO Install ZFS-Plugin ; OMV_OldGUI ; ShellinaBOX ;

      The post was edited 4 times, last by raulfg3 ().

    • Hello , i want to post a very interesting post the user drinks2go send me.

      It solve in a elegant way the problem of acces to pi-hole webGUI, so many thanks to drinks2go for his contribution:

      drinks2go wrote:

      Let us say the open media vault ip is 192.168.0.21
      and that our desired ip for pihole is 192.168.0.22


      then we must create a file /usr/share/openmediavault/mkconf/interfaces.d/99pihole


      into which we place:


      CODE-----------


      #!/bin/sh
      #
      # This file is part of OpenMediaVault.
      #
      # @license gnu.org/licenses/gpl.html GPL Version 3
      # @author Volker Theile <volker.theile@openmediavault.org>
      # @copyright Copyright (c) 2009-2015 Volker Theile
      #
      # You should have received a copy of the GNU General Public License
      # along with OpenMediaVault. If not, see <gnu.org/licenses/>.
      set -e
      . /etc/default/openmediavault
      . /usr/share/openmediavault/scripts/helper-functions
      OMV_INTERFACES_CONFIG=${OMV_INTERFACES_CONFIG:-"/etc/network/interfaces"}
      cat <<EOF >> ${OMV_INTERFACES_CONFIG}
      # The pihole interface ipv4
      iface eth0 inet static
      address 192.168.0.22
      gateway 192.168.0.1
      netmask 255.255.255.0
      # SLAAC pihole interface ipv6
      iface eth0 inet6 auto
      privext 2
      pre-up echo 1 > /proc/sys/net/ipv6/conf//autoconf
      pre-up echo 1 > /proc/sys/net/ipv6/conf//accept_ra
      pre-up echo 0 > /proc/sys/net/ipv6/conf//disable_ipv6
      EOF
      END CODE----------------------


      Save then we need to chmod u+x the 99pihole file, and run omv-mkconf
      interfaces. This will commit the info to /etc/network/interfaces
      permanently.


      Next we move to nginx, we have to configure so that it doesn't cause
      problems with lighttpd. So. We will open /etc/nginx/sites-enabled/openmediavault-webgui and find the following two lines:
      listen 80; -> replace with -> listen 192.168.0.21:80;
      listen 443 ssl deferred; -> replace with -> listen 192.168.0.21:443 ssl deferred;


      Save then do nginx -t to test configuration and if all is ok then we can
      sudo service nginx force-reload and also sudo service nginx restart.


      Next we move to monit, we have to configure so that it doesn't have
      problems detecting nginx port. So. We will open /etc/monit/conf.d/openmediavault-nginx.conf and find the following line:
      "if failed host 127.0.0.1 port 443" and replace 127.0.0.1 with
      192.168.0.21 (leave the port 443 in, it might be port 80 in
      openmediavault-nginx.conf if you don't have ssl enabled).


      Now we are done with OMV configuration portion. Next we will configure
      lighttpd. If you have changed the server.port in
      /etc/lighttpd/lighttpd.conf you should change it back to 80. Instead, we
      will create the file /etc/lighttpd/external.conf, which is preserved
      from the pihole update and reinstall process. Otherwise when you run
      pihole -up or pihole -r you will need to edit
      /etc/lighttpd/lighttpd.conf every time.


      Into /etc/lighttpd/external.conf we place one single line:
      server.bind = "192.168.0.22"


      This will constrain Lighttpd to listening on port 80 at 192.168.0.22. Save the file, then from command line run:
      lighttpd -t -f /etc/lighttpd/lighttpd.conf
      to test the configuration. If it's ok then you can restart the lighttpd webserver.


      It is 100% easier to take a backup with Pi-Hole teleport (in the
      settings page), disable all pihole stuff on your network, switch to your
      router, and do the configuration that way. Otherwise if you try with
      pihole still enabled you can run into some frustrating problems with
      dns, etc.


      I hope you will try this out and update your tutorial if it works for
      you. I think it is a much better solution than to listen simply on
      another port. Let me know what you think! Cheers.
      OMV 3.0.84 x64 on a HP T510, 32GB SSD 2,5" disk, 4 GB RAM, CPU VIA EDEN X2 U4200 is x64 at 1GHz

      Post: HPT510 SlimNAS ; HOWTO Install Pi-Hole ; HOWTO install MLDonkey ; HOHTO Install ZFS-Plugin ; OMV_OldGUI ; ShellinaBOX ;

      The post was edited 1 time, last by raulfg3 ().