tomd





Junior Member Joined: Apr 2016 Posts: 2

Reputation: 1 #1



What is Pi-hole?

pi - hole - A black hole for Internet advertisements (designed for Raspberry Pi)

https://pi-hole.net/



Install Ubuntu following damikeh's



Boot it up, personally I would suggest changing the default password and possibly adding another account, and changing the hostname but that's just my personal preference.



Update the repos and check for upgrades by running

Code: sudo apt-get update

sudo apt-get upgrade

Then I installed my preferred CLI txt editor (nano) though any should work. While we are at it, going to install PHP which we will need for Pi-hole Web Interface



Code: sudo apt-get install nano php7.0-cgi php7.0-fpm

This may prompt you asking if you want to continue, respond with Y for yes.



Now we need to setup out network with a static IP address. I'm using the built in ethernet and am setting my IP to 192.168.1.240 and my router is located at 192.168.1.1 and we will use Googles DNS servers

Code: sudo nano /etc/network/interfaces.d/eth0

By default this will probably look something like

Code: auto eth0

iface eth0 inet dhcp

But we want it to me more like (changing any values as needed for your local network)

Code: auto eth0

iface eth0 inet static

address 192.168.1.240

gateway 192.168.1.1

netmask 255.255.255.0

network 192.168.1.0

broadcast 192.168.1.255

dns-nameservers 8.8.8.8 8.8.4.4

Now we need to restart the network so changes take effect, this should be able to be done without restarting the board itself, but none of the usual ways seem to be working for me so we can just reboot the board

Code: sudo reboot

Now once we login we can check and make sure out network settings are working by running ifconfig

Code: tomd@marvin2:~$ ifconfig

eth0 Link encap:Ethernet HWaddr 36:c9:e3:f1:b8:05

inet addr:192.168.1.240 Bcast:192.168.1.255 Mask:255.255.255.0

inet6 addr: fe80::34c9:e3ff:fef1:b805/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:20537 errors:0 dropped:0 overruns:0 frame:0

TX packets:19598 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:6151787 (6.1 MB) TX bytes:3605516 (3.6 MB)

Interrupt:114



lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:65536 Metric:1

RX packets:264 errors:0 dropped:0 overruns:0 frame:0

TX packets:264 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:19785 (19.7 KB) TX bytes:19785 (19.7 KB)

If all went well, our inet addr should now match our desire static IP!





Now getting Pi-hole on the rest of the way is easy!

Code: curl -L install.pi-hole.net | bash

It will take a few as it downloads and installs necessary packages, it will get made that PHP5 packages aren't available but we already install PHP7 so it seems to work for me!

Just follow all the prompts, I left the network interface stuff alone since we already configured that and once the installer finishes, it should be ready to go!



Next you'll need to change the DNS server your computer or device is using to the IP you set for your Pi-hole (192.168.1.240 for me).



Then to access the Web Control Interface, point your browser to



http://192.168.1.240/admin/index.php



You should get a page similar to mine







Let me know if this helps anybody out! If you have problems, I'll do my best to help troubleshoot but am no means an expert on this! Just a quick writeup on how I got Pi-Hole running on a Pine A64 512MB. I am by no means a professional or expert, just know enough to really mess things up! If I screwed anything up or am doing anything the hard way, please don't hesitate to correct me!Install Ubuntu following damikeh's How To Boot it up, personally I would suggest changing the default password and possibly adding another account, and changing the hostname but that's just my personal preference.Update the repos and check for upgrades by runningThen I installed my preferred CLI txt editor (nano) though any should work. While we are at it, going to install PHP which we will need for Pi-hole Web InterfaceThis may prompt you asking if you want to continue, respond with Y for yes.Now we need to setup out network with a static IP address. I'm using the built in ethernet and am setting my IP to 192.168.1.240 and my router is located at 192.168.1.1 and we will use Googles DNS serversBy default this will probably look something likeBut we want it to me more like (changing any values as needed for your local network)Now we need to restart the network so changes take effect, this should be able to be done without restarting the board itself, but none of the usual ways seem to be working for me so we can just reboot the boardNow once we login we can check and make sure out network settings are working by running ifconfigIf all went well, our inet addr should now match our desire static IP!Now getting Pi-hole on the rest of the way is easy!It will take a few as it downloads and installs necessary packages, it will get made that PHP5 packages aren't available but we already install PHP7 so it seems to work for me!Just follow all the prompts, I left the network interface stuff alone since we already configured that and once the installer finishes, it should be ready to go!Next you'll need to change the DNS server your computer or device is using to the IP you set for your Pi-hole (192.168.1.240 for me).Then to access the Web Control Interface, point your browser toYou should get a page similar to mineLet me know if this helps anybody out! If you have problems, I'll do my best to help troubleshoot but am no means an expert on this! Reply curiousgally





Junior Member Joined: Feb 2016 Posts: 14

Reputation: 0 #2



I tried to nslookup and this is what i get:



C:\Users\curiousgally>nslookup -debug

DNS request timed out.

timeout was 2 seconds.

timeout (2 secs)

Server: UnKnown

Address: 192.168.1.11



DNS request timed out.

timeout was 2 seconds.

timeout (2 secs)

DNS request timed out.

timeout was 2 seconds.

timeout (2 secs)

DNS request timed out.

timeout was 2 seconds.

timeout (2 secs)

DNS request timed out.



192.168.1.11 is my pine-64 ip address i have used in pi-hole configuration. I have setup dns address in my router to the same. So windows is able to see it as dns end point through router..but not getting any response.



On my pine-64 netstat gives the following:



ubuntu@pine64:~$ netstat -anlp | grep -w LISTEN

(No info could be read for "-p": geteuid()=1000 but you should be root.)

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN -

tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN -

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -

tcp 0 0 0.0.0.0:8920 0.0.0.0:* LISTEN -

tcp 0 0 0.0.0.0:8096 0.0.0.0:* LISTEN -

tcp6 0 0 :::80 :::* LISTEN -

tcp6 0 0 :::53 :::* LISTEN -

tcp6 0 0 :::22 :::* LISTEN





Wondering why other machines not getting dns response from pi-hole.



Any help is appreciated.



Thanks. I tried this on my pine64. I have issues when devices reach out to pi-hole for dns queries. I mean when i run from the pine-64 it works fine but when I try to access from a different device it doesn't work.I tried to nslookup and this is what i get:C:\Users\curiousgally>nslookup -debug www.google.com DNS request timed out.timeout was 2 seconds.timeout (2 secs)Server: UnKnownAddress: 192.168.1.11DNS request timed out.timeout was 2 seconds.timeout (2 secs)DNS request timed out.timeout was 2 seconds.timeout (2 secs)DNS request timed out.timeout was 2 seconds.timeout (2 secs)DNS request timed out.192.168.1.11 is my pine-64 ip address i have used in pi-hole configuration. I have setup dns address in my router to the same. So windows is able to see it as dns end point through router..but not getting any response.On my pine-64 netstat gives the following:ubuntu@pine64:~$ netstat -anlp | grep -w LISTEN(No info could be read for "-p": geteuid()=1000 but you should be root.)tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN -tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN -tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -tcp 0 0 0.0.0.0:8920 0.0.0.0:* LISTEN -tcp 0 0 0.0.0.0:8096 0.0.0.0:* LISTEN -tcp6 0 0 :::80 :::* LISTEN -tcp6 0 0 :::53 :::* LISTEN -tcp6 0 0 :::22 :::* LISTENWondering why other machines not getting dns response from pi-hole.Any help is appreciated.Thanks. Reply checktravis





Junior Member Joined: Jul 2016 Posts: 3

Reputation: 0 #3 I finally got this working, I think. But now there is a "dummy" adapter listed. I never heard of them before today so I'm Googleing. Is there anything wrong with leaving it alone? I'm just happy it's working so I'll leave it be if it doesn't lag or anything. Reply MarkHaysHarris777





Posting Freak Joined: Mar 2016 Posts: 1,949

Reputation: 146 #4 If it ain't broke, fix it until it is.



please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697



( I regret that I am not able to respond to personal messages; let's meet on irc! )

marcushh777please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697( I regret that I am not able to respond to personal messages; let's meet on irc! ) Reply chadbhowell





Junior Member Joined: Jun 2016 Posts: 2

Reputation: 0 #5



Code: sudo apt remove dhcpcd5 Try removing dhcpcd5 after the install. It has been known to cause DNS lookup issues with piHole on Debain based systems. piHole will run just fine without it except for the DHCP server. You will have to remove this every time you upgrade piHole too. Reply checktravis





Junior Member Joined: Jul 2016 Posts: 3

Reputation: 0 #6 (01-05-2017, 08:21 PM) chadbhowell Wrote: Try removing dhcpcd5 after the install...

Just an update, I switched to my odroid-c2 but same setup and removed dhcpcd5 as suggested and that seems to have done the trick.



still had to change "dev" to the actual ip address in the setup wizzard (curl ...) but no dummy adapter now.



thanks for the tips. the official pi-hole installer is making progress every day it seems. was happy to donate toward the project. I have a netgear x10, a $500 router with terrible dhcp support, this pi-hole project is doing a great job filling in the gaps in my network. Just an update, I switched to my odroid-c2 but same setup and removed dhcpcd5 as suggested and that seems to have done the trick.still had to change "dev" to the actual ip address in the setup wizzard (curl ...) but no dummy adapter now.thanks for the tips. the official pi-hole installer is making progress every day it seems. was happy to donate toward the project. I have a netgear x10, a $500 router with terrible dhcp support, this pi-hole project is doing a great job filling in the gaps in my network. Reply DanSchaper





Junior Member Joined: Jan 2017 Posts: 4

Reputation: 0 #7 Hi, one of the Pi-hole developers here. dhcpcd5 is a vestigial package that we brought over from the Other platform that we started out on. If you set your static IP address the way most of the distributions do, via /etc/network/interfaces, then you can remove the dhcpcd5 client daemon and things should run just as well as stock. If you have any other questions or problems please let me know and well work on getting them solved. We do plan on removing the dhcpcd5 package as a dependency on platforms that don't require it, but there is no firm date for that resolution.



Thanks! Reply auger





Junior Member Joined: Jan 2017 Posts: 4

Reputation: 0 #8



I'm trying to set this up on my pine running longsleep's 16.04 image. It never jumps to the installer.



Code: s@pine64:~$ sudo su

root@pine64:/home/s# sudo curl -L install.pi-hole.net | bash

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

100 42644 100 42644 0 0 65512 0 --:--:-- --:--:-- --:--:-- 355k

:::

::: You are root.

::: Verifying free disk space...

:::

::: Updating local cache of available packages...root@pine64:/home/s#



I installed PHP7 per the instructions above but it didn't seem to do anything. Any ideas?



Thanks!

S Hey all,I'm trying to set this up on my pine running longsleep's 16.04 image. It never jumps to the installer.I installed PHP7 per the instructions above but it didn't seem to do anything. Any ideas?Thanks! Reply DanSchaper





Junior Member Joined: Jan 2017 Posts: 4

Reputation: 0 #9 (01-20-2017, 10:26 AM) auger Wrote: Code: ::: You are root.

::: Verifying free disk space...

:::

::: Updating local cache of available packages...root@pine64:/home/s#

Try running:

Code: curl -L install.pi-hole.net | sudo bash -x





That will at least show you the command that the installer script failed out at. It's run as `set -e` so that it will stop on a failure. The place it looks to be failing is at the `apt-get update` process part of the script. Try running:That will at least show you the command that the installer script failed out at. It's run as `set -e` so that it will stop on a failure. The place it looks to be failing is at the `apt-get update` process part of the script. Reply auger





Junior Member Joined: Jan 2017 Posts: 4

Reputation: 0 #10 (01-20-2017, 08:54 PM) DanSchaper Wrote: (01-20-2017, 10:26 AM) auger Wrote: Code: ::: You are root.

::: Verifying free disk space...

:::

::: Updating local cache of available packages...root@pine64:/home/s#

Try running:

Code: curl -L install.pi-hole.net | sudo bash -x





That will at least show you the command that the installer script failed out at. It's run as `set -e` so that it will stop on a failure. The place it looks to be failing is at the `apt-get update` process part of the script.

Thanks. It does indeed look like it's failing at the update.



Code: sudo curl -L install.pi-hole.net | sudo bash -x

[sudo] password for s:

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0+ set -e

+ tmpLog=/tmp/pihole-install.log

+ instalLogLoc=/etc/pihole/install.log

+ setupVars=/etc/pihole/setupVars.conf

+ lighttpdConfig=/etc/lighttpd/lighttpd.conf

+ webInterfaceGitUrl=https://github.com/pi-hole/AdminLTE.git

+ webInterfaceDir=/var/www/html/admin

+ piholeGitUrl=https://github.com/pi-hole/pi-hole.git

+ PI_HOLE_LOCAL_REPO=/etc/.pihole

+ PI_HOLE_FILES=(chronometer list piholeDebug piholeLogFlush setupLCD update version)

+ useUpdateVars=false

+ IPV4_ADDRESS=

+ IPV6_ADDRESS=

+ QUERY_LOGGING=true

++ stty size

++ echo 24 80

+ screen_size='24 80'

++ echo '24 80'

++ awk '{print $1}'

+ rows=24

++ echo '24 80'

++ awk '{print $2}'

+ columns=80

+ r=12

+ c=40

+ r=20

+ c=70

+ skipSpaceCheck=false

+ reconfigure=false

+ runUnattended=false

+ command -v apt-get

+ PKG_MANAGER=apt-get

+ UPDATE_PKG_CACHE='apt-get update'

+ PKG_INSTALL='apt-get --yes --no-install-recommends install'

+ PKG_COUNT='apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'

+ apt-get install --dry-run iproute2

100 42644 100 42644 0 0 22652 0 0:00:01 0:00:01 --:--:-- 44099

+ IPROUTE_PKG=iproute2

+ apt-get install --dry-run php

+ phpVer=php

+ INSTALLER_DEPS=(apt-utils debconf dhcpcd5 git whiptail)

+ PIHOLE_DEPS=(bc cron curl dnsmasq dnsutils ${IPROUTE_PKG} iputils-ping lighttpd lsof netcat ${phpVer}-common ${phpVer}-cgi sudo unzip wget)

+ LIGHTTPD_USER=www-data

+ LIGHTTPD_GROUP=www-data

+ LIGHTTPD_CFG=lighttpd.conf.debian

+ DNSMASQ_USER=dnsmasq

+ [[ '' != true ]]

+ main

+ echo :::

:::

+ [[ 0 -eq 0 ]]

+ echo '::: You are root.'

::: You are root.

+ [[ -f /etc/pihole/setupVars.conf ]]

+ [[ false == true ]]

+ verifyFreeDiskSpace

+ echo '::: Verifying free disk space...'

::: Verifying free disk space...

+ local required_free_kilobytes=51200

++ df -Pk

++ grep -m1 '\/$'

++ awk '{print $4}'

df: /mnt/usbhdd2: Transport endpoint is not connected

+ local existing_free_kilobytes=8223152

+ [[ 8223152 =~ ^([0-9])+$ ]]

+ [[ 8223152 -lt 51200 ]]

+ update_pacakge_cache

+ echo :::

:::

+ echo -n '::: Updating local cache of available packages...'

::: Updating local cache of available packages...+ apt-get update Thanks. It does indeed look like it's failing at the update. Reply