Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[HowTo] Pi-Hole network wide ad-blocking on XBian
Thank you for your donation

Pages (2): 1 2 Next »
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
[HowTo] Pi-Hole network wide ad-blocking on XBian
8th May, 2017, 06:15 AM (This post was last modified: 8th May, 2017 06:36 AM by deHakkelaar.)
Post: #1
deHakkelaar Offline
Administrator
******
Posts: 360
Joined: Dec 2012
Reputation: 23
[HowTo] Pi-Hole network wide ad-blocking on XBian
For info about Pi-Hole:
https://pi-hole.net/

This HowTo was performed on a Raspberry Pi B+.
A plain Raspberry Pi B was tested too but was OOMing allot.

Terminal
$ cat /etc/debian_version
9.0

Terminal
$ uname -r -m
4.9.20+ armv6l

Code:
### 1. Stop Kodi(former XBMC):
sudo stop xbmc

### 2. Configure a static IP address using below one because XBian is not using
###    "/etc/dhcpcd.conf" that Pi-Hole is using to set static IP:
###    *Might need a reboot so after, stop Kodi again(step 1) to continue.
sudo xbian-config

### 3. Create missing symlink needed by the pihole-FTL daemon:
sudo ln -s /lib/arm-linux-gnueabihf/ld-linux.so.3 /lib/ld-linux.so.3

### 4. Install curl:
sudo apt install curl

### 5. Run the Pi-Hole installer:
curl -sSL https://install.pi-hole.net | bash

### 6. Have the "pihole-FTL" daemon start at boot as XBian uses "Upstart" as init:
sudo update-rc.d pihole-FTL defaults

### 7. Reboot:
sudo reboot

### 8. Point your browser on the client to the Pi-Hole web GUI:
###      http://<PI-HOLE_IP_ADDRESS>/admin
###    Or if configured DHCP/DNS properly:
###      http://pi.hole/admin

There are only 10 types of people in the world: those who understand binary, and those who don't
Find all posts by this user
Quote this message in a reply
8th May, 2017, 06:15 AM
Post: #2
deHakkelaar Offline
Administrator
******
Posts: 360
Joined: Dec 2012
Reputation: 23
RE: [HowTo] Pi-Hole ad-blocking on XBian
Am still testing but it looks promising.
If only the Kodi "Web Viewer" addon would display the Pi-Hole admin page properly.

There are only 10 types of people in the world: those who understand binary, and those who don't
Find all posts by this user
Quote this message in a reply
23rd May, 2017, 04:44 AM
Post: #3
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
@deHakkelaar

Thanks for taking the time to post this. I have installed it today with your instructions and it seems to be working very well now!

Very Good!
Find all posts by this user
Quote this message in a reply
25th May, 2017, 01:46 AM
Post: #4
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
I was watching the memory usage creeping up, some kind of memory hole.

But it seems that they have fixed this now. With pi-hole,kodi, LCDProc and more running I only see 28% memory used stable.
Find all posts by this user
Quote this message in a reply
25th May, 2017, 03:10 AM
Post: #5
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
Probably pihole-FTL was the culprit Dodgy
Find all posts by this user
Quote this message in a reply
26th May, 2017, 02:32 AM
Post: #6
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
You are most likely correct. I did notice that it got worse if I left a window open monitoring activity, but now it is no problem at all. At least it does give the cpu temp in the display and that prompted me to get a temp controlled fan solution working. Now all is working well and cool too!
Find all posts by this user
Quote this message in a reply
30th May, 2017, 05:39 AM
Post: #7
deHakkelaar Offline
Administrator
******
Posts: 360
Joined: Dec 2012
Reputation: 23
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
Sweet.
By now I experienced a Pi B+ is not able to keep up sometimes.
Sometimes when starting media or other heavy load tasks, DNS resolution times out (WiFi though).
Have not tried on a Pi 2 yet but reckon that one wont break a sweat.

There are only 10 types of people in the world: those who understand binary, and those who don't
Find all posts by this user
Quote this message in a reply
31st May, 2017, 02:27 AM
Post: #8
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
@deHakkelaar,

FWIW I am running on a pi1 model B. It has Xbian with kodi 17.3, a few other progs, a RTC board, a 20x4 LCD display (for kodi), a python controlled fan for cooling, watchdog and now pihole too. Memory use is virtually constant even when streaming radio at about 34-37%. Temp with cooling fan and heatsinks has gone from 60C+ to 35-36C (set to 35C ideal temp), much better! I have about 6 clients using pi hole now with 3000+ DNS requests in the last 24 hours. It runs stable after the latest FTL update. I only use wired ethernet though.

But thank you for posting about pi hole and how to set it up on Xbian, I can now monitor all my DNS traffic in a nice graphic way and get rid of some annoying ads at the same time - As you say, Sweet! ..... Smile
Find all posts by this user
Quote this message in a reply
2nd Jul, 2017, 11:08 PM
Post: #9
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
OK - SO now I have a problem with this (always the case with me it seems) Tongue

I have set it up to auto-update over night. But I always get the error "Failed to get D-Bus connection: Unknown error -1".

ANy ideas how to fix? It doesn't seem to affect the functioning, but is annoying/worrisome.... Sad
Find all posts by this user
Quote this message in a reply
3rd Jul, 2017, 12:23 AM
Post: #10
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
(2nd Jul, 2017 11:08 PM)Skywatch Wrote:  OK - SO now I have a problem with this (always the case with me it seems) Tongue

I have set it up to auto-update over night. But I always get the error "Failed to get D-Bus connection: Unknown error -1".

ANy ideas how to fix? It doesn't seem to affect the functioning, but is annoying/worrisome.... Sad

auto-update of what?

I you configured Pi-Hole for auto-update, I suppose Pi-Hole update script tries to run a systemctl command to start/stop/restart a service or whatever.

Terminal

root@kmcubie:~# LC_ALL=C systemctl status autofs
Failed to get D-Bus connection: Unknown error -1
root@kmcubie:~#
Find all posts by this user
Quote this message in a reply
3rd Jul, 2017, 12:32 AM
Post: #11
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
This is IMO issue of Pi-Hole

Terminal

root@kmpihole:/etc/cron.d# cat /usr/local/bin/pihole | grep system
if [ -x "$(command -v systemctl)" ]; then
systemctl restart dnsmasq
if [ -x "$(command -v systemctl)" ]; then
systemctl start dnsmasq
::: uninstall Uninstall Pi-hole from your system! Sad

You can see, script pihole is checking only if systemctl is present and executable, but not checking if systemd is running or not
Find all posts by this user
Quote this message in a reply
3rd Jul, 2017, 01:48 AM
Post: #12
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
Hi Nachteule,

Thanks for jumping in on this, always appreciated.

I first wrote cron jobs to check for updates to the lists and the main programs. Then I found it was already in their config so switched to using that instead.

The error occurs with a reference to DNSmasq at the end of the 'lists' update.
Code:
Refresh lists in dnsmasq...Failed to get D-Bus connection: Unknown error -1
done!
::: DNS service is running

I checked on the web and ran some commands to see if things were running OK and all seemed well, so that was when I posted here.

Off to watch your teams glorious victory in tonights final, so won't be around to talk again until tomorrow..... Tongue
Find all posts by this user
Quote this message in a reply
3rd Jul, 2017, 02:19 AM
Post: #13
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
(3rd Jul, 2017 01:48 AM)Skywatch Wrote:  Off to watch your teams glorious victory in tonights final, so won't be around to talk again until tomorrow..... Tongue

Hopefully you're crossing fingers for German team Big Grin
Find all posts by this user
Quote this message in a reply
5th Jul, 2017, 05:45 PM
Post: #14
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
Well, a win is a win I suppose, even if the better team lost Tongue

The pihole guy says the problem is with systemd as the following is not how it should be.....

[xbian@kitchen ~ $ systemctl status dnsmasq
Failed to get D-Bus connection: Unknown error -1

and

ps -p 1 -o comm=
init

So look like booting from init and not systemd....

Any ideas ?
Find all posts by this user
Quote this message in a reply
5th Jul, 2017, 07:51 PM (This post was last modified: 5th Jul, 2017 07:52 PM by Nachteule.)
Post: #15
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: [HowTo] Pi-Hole network wide ad-blocking on XBian
(5th Jul, 2017 05:45 PM)Skywatch Wrote:  Well, a win is a win I suppose, even if the better team lost Tongue

The pihole guy says the problem is with systemd as the following is not how it should be.....

What a stupid answer ...

systemctl is always installed independent if systemd is used or not. Debian Jessie supports three init systems:
systemd (the default one Sad) sysv and upstart (that XBian uses)

Quote:[xbian@kitchen ~ $ systemctl status dnsmasq
Failed to get D-Bus connection: Unknown error -1

and

ps -p 1 -o comm=
init

So look like booting from init and not systemd....

Sure, XBian is using Upstart

Quote:Any ideas ?

Yeah. They should remove the stupid check if systemctl is installed/executable and use service dnsmasq ... instead (the service wrapper script checks itself which init system is running, so there is NO need to do this in pihole script again)
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 11th May, 2025, 07:39 PM Powered By MyBB, © 2002-2025 MyBB Group.