Pi-Hole on OSMC
images Want to know how to run OSMC and Pi-Hole at the same time?

 

pihole150v21) First, statically set the LAN IP of the Pi/OSMC. I've additionally done this on my router wink emoticon

2) Ensure the web server is or not on port 80 (e.g. 8080)

3) Connect by SSH to your raspberry pi (default username: osmc password: osmc)

4) sudo nano /usr/bin/start-network

5) Change the line (found at the bottom) 'exec /usr/sbin/connmand -n --config=/etc/connman.conf' to 'exec /usr/sbin/connmand -n --config=/etc/connman.conf --nodnsproxy'

6) sudo reboot

7) SSH back in

8) sudo apt-get install whiptail

9) sudo apt-get install iproute2

10) curl -L install.pi-hole.net | bash

11) Reboot (just in case)

12) Set your PC to use the DNS of your Pi.

 

Note:  This process may not be required with latest Pi-Hole install.

You now have OSMC running with PiHole.  You can add the web server afterward. (https://pi-hole.net/install-the-web-interface-on-an.../)

 

1)  sudo apt-get -y install php5-common php5-cgi php5

2)  sudo lighty-enable-mod fastcgi fastcgi-php

3)  sudo wget https://github.com/jacobsalmela/AdminLTE/archive/master.zip -O /var/www/master.zip

4)  sudo unzip /var/www/master.zip -d /var/www/html/

5)  sudo mv /var/www/html/AdminLTE-master /var/www/html/admin

6)  sudo rm /var/www/master.zip 2>/dev/null

7)  sudo touch /var/log/pihole.log

8)  sudo chmod 644 /var/log/pihole.log

9)  sudo chown dnsmasq:root /var/log/pihole.log

10)  sudo nano /etc/lighttpd/lighttpd.conf

Add the following to end of file:

$HTTP["url"] =~ "^(?!/admin)/.*" {

url.rewrite = (".*" => "pihole/index.html" )

}

11)  sudo service lighttpd restart

 

To access web interface navigate to:

http://<IP address of your Pi>/admin/index.php

 

Recommend uploading apiext.php file as per instructions on the following links.  This will allow access to via Googles Extension:

https://www.reddit.com/r/raspberry_pi/comments/423z22/looking_for_a_few_testers_with_piholes/

https://github.com/packtloss/pihole-extension/blob/master/server/apiext.php

 

Source of info:

http://jacobsalmela.com/block-millions-ads-network-wide.../

https://www.reddit.com/.../does_the_pihole_installer.../

https://discourse.osmc.tv/.../adblock-dns-service.../2953</p