No Internet connection

Bad idea. After the adjustment to 127.0.0.1 nothing works anymore. I can no longer access the Raspi / pi-hole.
I have to organize a monitor incl. cable, etc. so that I can get to the Raspi...

Changing /etc/resolv.conf to 127.0.0.1 will not cause it to become unresponsive. At worst it would just not be able to resolve names to IP addresses. Communication via IP would be unaffected.

The software "Pi Finder" from Adfruit is handy to find any Pi on your network.

Thank you very much for the replies!

Oops :scream: I always wrote from the file /etc/dhcpcd.conf. Here about the entry "static domain_name_servers".
Do I have do change to 127.0.0.1 in /etc/resolv.conf? :thinking:

Thank you @jfb for the tip on Pi Finder. I will try it out.

No.
dhcpcd does that for you by calling bellow one:

pi@noads:~ $ man resolvconf
[..]
DESCRIPTION
       The resolvconf package comprises a simple database  for  run-time
       nameserver  information  and  a  simple  framework  for notifying
       applications of changes in  that  information.   Resolvconf  thus
       sets  itself  up as the intermediary between programs that supply
       nameserver information and applications that  use  that  informa‐
       tion.

       Information  is  added  to or removed from the database using the
       resolvconf program.  See the OPTIONS section below for a  discus‐
       sion of the available options.

OK.
/etc/resolv.conf is

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1

Hm, but now again. Same problem as in the beginning. No Internet connection.
I also cannot update a debug log via pihole -d

But your able to ping from Pi-hole to an outside address like for example Google's DNS at 8.8.8.8 right ?

ping 8.8.8.8

Check status for the pihole-FTL daemon thats suppose to answer DNS queries on 127.0.0.1:

sudo service pihole-FTL status

journalctl -u pihole-FTL

Yes. I get replies if I ping 8.8.8.8.

Output of sudo service pihole-FTL status is:

● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
   Active: active (exited) since Mon 2018-12-17 21:43:34 CET; 2min 43s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2796 ExecStop=/etc/init.d/pihole-FTL stop (code=exited, status=0/SUCC
  Process: 2855 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SU

Dez 17 21:43:23 RASPI-01 systemd[1]: Starting LSB: pihole-FTL daemon...
Dez 17 21:43:23 RASPI-01 pihole-FTL[2855]: Not running
Dez 17 21:43:33 RASPI-01 su[2908]: Successful su for pihole by root
Dez 17 21:43:33 RASPI-01 su[2908]: + ??? root:pihole
Dez 17 21:43:33 RASPI-01 su[2908]: pam_unix(su:session): session opened for user
Dez 17 21:43:34 RASPI-01 pihole-FTL[2855]: FTL started!
Dez 17 21:43:34 RASPI-01 systemd[1]: Started LSB: pihole-FTL daemon.

And journalctl -u pihole-FTL

- Logs begin at Thu 2016-11-03 18:16:42 CET, end at Mon 2018-12-17 21:44:33 CET
Dez 17 21:34:01 RASPI-01 systemd[1]: Starting LSB: pihole-FTL daemon...
Dez 17 21:34:01 RASPI-01 pihole-FTL[344]: Not running
Dez 17 21:34:13 RASPI-01 su[835]: Successful su for pihole by root
Dez 17 21:34:13 RASPI-01 su[835]: + ??? root:pihole
Dez 17 21:34:13 RASPI-01 su[835]: pam_unix(su:session): session opened for user 
Dez 17 21:34:14 RASPI-01 pihole-FTL[344]: FTL started!
Dez 17 21:34:14 RASPI-01 systemd[1]: Started LSB: pihole-FTL daemon.
Dez 17 21:41:51 RASPI-01 systemd[1]: Stopping LSB: pihole-FTL daemon...
Dez 17 21:41:52 RASPI-01 pihole-FTL[1867]: .
Dez 17 21:41:52 RASPI-01 pihole-FTL[1867]: Stopped
Dez 17 21:41:52 RASPI-01 systemd[1]: Stopped LSB: pihole-FTL daemon.
Dez 17 21:41:52 RASPI-01 systemd[1]: Starting LSB: pihole-FTL daemon...
Dez 17 21:41:52 RASPI-01 pihole-FTL[1926]: Not running
Dez 17 21:42:03 RASPI-01 su[1980]: Successful su for pihole by root
Dez 17 21:42:03 RASPI-01 su[1980]: + ??? root:pihole
Dez 17 21:42:03 RASPI-01 su[1980]: pam_unix(su:session): session opened for user
Dez 17 21:42:03 RASPI-01 pihole-FTL[1926]: FTL started!
Dez 17 21:42:03 RASPI-01 systemd[1]: Started LSB: pihole-FTL daemon.
Dez 17 21:42:32 RASPI-01 systemd[1]: Stopping LSB: pihole-FTL daemon...
Dez 17 21:42:33 RASPI-01 pihole-FTL[2061]: .
Dez 17 21:42:33 RASPI-01 pihole-FTL[2061]: Stopped
Dez 17 21:42:33 RASPI-01 systemd[1]: Stopped LSB: pihole-FTL daemon.
lines 1-23

Date and time are not correct :wink:
This is not set correctly due to the missing internet connection.

On Pi-hole, do you get reply from a DNS lookup directed at the loopback IP:

nslookup pi.hole $(hostname -i)

And targeting the IP on the physical interface:

nslookup pi.hole $(hostname -I)

Yes indeed.
The time syncing daemon systemd-timesyncd or ntpd depends on DNS resolution to be able to sync to a time server.

EDIT: ps. status looks good and appears pihole-FTL is running/active.

1 Like

Yes.
For nslookup pi.hole $(hostname -i)

nslookup pi.hole $(hostname -i)
Server:		127.0.1.1
Address:	127.0.1.1#53

Name:	pi.hole
Address: 192.168.99.4

and for nslookup pi.hole $(hostname -I)

nslookup pi.hole $(hostname -I)
Server:		192.168.99.4
Address:	192.168.99.4#53

Name:	pi.hole
Address: 192.168.99.4

And a lookup for a name that pihole-FTL doesnt have a record for and needs to forward to the upstream configured DNS server(s):

nslookup pi-hole.net

Then I get

nslookup pi-hole.net
Server:		127.0.0.1
Address:	127.0.0.1#53

** server can't find pi-hole.net: SERVFAIL

Please generate a Pi-Hole debug log, upload when prompted and post the token here.

Whats your upstream configured DNS server(s) ? DNSSEC involved that depends on accurate date/time ?

grep 'PIHOLE_DNS\|DNSSEC' /etc/pihole/setupVars.conf

Here it is:
grep 'PIHOLE_DNS|DNSSEC' /etc/pihole/setupVars.conf
PIHOLE_DNS_3=84.200.69.80
PIHOLE_DNS_4=84.200.70.40
PIHOLE_DNS_5=9.9.9.9
PIHOLE_DNS_6=149.112.112.112
PIHOLE_DNS_7=1.1.1.1
PIHOLE_DNS_8=1.0.0.1
DNSSEC=true
PIHOLE_DNS_1=208.67.222.222
PIHOLE_DNS_2=208.67.220.220

@jfb Thanks for the tip with the debug log. I can generate a debug log via pihole -d but I cannot upload it - no internet connection :sunglasses:

This will temporarily reset the nameserver on the Pi to bypass Pi-Hole DNS.

sudo nano /etc/resolv.conf

edit nameserver 127.0.0.1 to nameserver 9.9.9.9 or your preferred third party DNS service, save and exit

Run pihole -d and upload the debug log

Chicken egg dilemma.
Time syncing depends on DNS resolution.
And DSN resolution via DNSSEC depends on accurate date time.
Try without DNSSEC or search here on discourse for other solution's for systems that dont have a real time clock on-board like some SBC's.

Run the date command from the Pi terminal and see if the date/time of the Pi matches your local time. If not, then reset it with the command below (you will have to substitute the correct date/time):

sudo date --set="21 December 2018 11:53:30"

1 Like

Yes, the chicken egg dilemma.

I ran the date command and set date and time correct. I now have a connection to the Internet again :+1:

@jfb: The analysis of the debug file is obsolete.

Thank you guys for the help! I appreciate that very much.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.