(SOLVED) Changing to pihole dns kills my internet

I've searched around this forum and tried some solutions there, one suggested disabling dnsmasq for dns.

I'm running dd-wrt on my d-link TP-Link TL-WR740N v4.

Expected behaviour:

Change dhcp dns settings on router and every device will redirect to the pihole.

Actual behaviour:

Changing dns setting to pihole kills my internet, both on the router side and client side.

I tried the obvious, I set my windows dns to point to the pihole. Load a page, the browser says "page not found".
Remove the dns entry, reload the page, and then the internet is working again.

Router@192.168.1.1
pihole@192.168.1.154

I've set it up here:

Notice dnsmasq for dns is disabled, it worked for the OP. Doesn't work for me.

Any ideas guy?

Lets check and make sure the Pi-hole is running correctly. Can you run pihole -d and post the token that is generated for you?

::: Beginning Pi-hole debug at Wed May 10 01:52:17 UTC 2017!
:::
::: This process collects information from your Pi-hole, and optionally uploads
::: it to a unique and random directory on tricorder.pi-hole.net.
:::
::: NOTE: All log files auto-delete after 48 hours and ONLY the Pi-hole develope rs
::: can access your data via the given token. We have taken these extra steps to
::: secure your data and will work to further reduce any personal information ga thered.
:::
::: Please read and note any issues, and follow any directions advised during th is process.
:::
::: ---= Detecting Installed Package Versions:
::: Pi-hole: v3.0.1 (master:v3.0.1-0-g26fcb1b)
::: Pi-hole Dashboard: v3.0.1 (master:v3.0.1-0-ge204cea)
::: lighttpd/1.4.35
::: PHP 5.6.30-0+deb8u1 (cli) (built: Apr 14 2017 16:20:58)
:::
::: ---= Detecting existence of /etc/pihole/setupVars.conf:
::: File exists, parsing...done and was successfully sourced
:::
::: ---= Detecting installed OS Distribution
:::
::: ---= Checking processor variety
:::
::: ---= Checking IPv6 Stack
::: IPv6 addresses located on eth0
::: No gateway detected.
:::
::: ---= Checking IPv4 Stack
::: IPv4 addresses located on eth0
::: No gateway detected.
:::
::: ---= Daemon Process Information
::: Checking http port for lighttpd listener.
::: Correctly configured.
:::
::: ---= Daemon Process Information
::: Checking domain port for dnsmasq listener.
::: Correctly configured.
:::
::: ---= Daemon Process Information
::: Checking 4711 port for pihole-FTL listener.
::: Correctly configured.
:::
::: ---= Processes Check
::: Logging status of lighttpd, dnsmasq and pihole-FTL...
:::
::: ---= Resolver Functions Check (IPv4)
::: Checking for necessary lighttpd files.
:::
::: ---= Detecting existence of /etc/lighttpd/lighttpd.conf:
::: File exists, parsing...done
:::
::: ---= Detecting existence of /var/log/lighttpd/error.log:
::: File exists, parsing...done
:::
:::
::: ---= Detecting existence of /etc/dnsmasq.conf:
::: File exists, parsing...done
:::
::: ---= Detecting contents of /etc/dnsmasq.d/*:
:::
::: ---= File /etc/dnsmasq.d/01-pihole.conf found
::: Parsing...done
:::
::: ---= File /etc/dnsmasq.d/README found
::: Parsing...done
:::
:::
::: ---= Detecting existence of /etc/pihole/whitelist.txt:
::: File exists, parsing...done
:::
::: ---= Detecting existence of /etc/pihole/blacklist.txt:
::: File exists, parsing...done
:::
::: ---= Detecting existence of /etc/pihole/adlists.list:
::: File exists, parsing...done
:::
::: ---= Analyzing gravity.list
:::
::: ---= Analyzing pihole.log
:::
::: ---= Analyzing pihole-FTL.log
:::
::: --= User Action Required =--
::: Try loading a site that you are having trouble with now from a client web browser..
::: (Press CTRL+C to finish logging.)
:::
::: ---= pihole.log
::: Logging will automatically teminate in 60 seconds
^C: 55 seconds left.
::: Finishing debug write from interrupt... Quitting!
::: Finshed debugging!
::: The debug log can be uploaded to tricorder.pi-hole.net for sharing with developers only.
::: Would you like to upload the log? [y/N] n
::: Log will NOT be uploaded to tricorder.
::: There was an error uploading your debug log.
::: Please try again or contact the Pi-hole team for assistance.
::: A local copy of the Debug log can be found at : /var/log/pihole_debug.log

Without being able to see the contents of the log, I'll go by the output from

::: ---= Checking IPv6 Stack
::: IPv6 addresses located on eth0
::: No gateway detected.
:::
::: ---= Checking IPv4 Stack
::: IPv4 addresses located on eth0
::: No gateway detected.

The Pi-hole is not set up with a valid IPv4 or IPv6 address.

should I re-run the installer? how would I do that?

Simply run the install command again?

I also set up the pihole for static ip on the router

You could run pihole -r and choose Reconfigure from the prompt. Again, kind of flying blind on this, the log has way more diagnostic information that would help pin-point exactly what the issue is.

okay...I'll run pihole -d again and say yes?

I;ll do it

EDIT: oh wait, i'll just cat the log

Here:

---= Detecting Installed Package Versions:

Pi-hole: v3.0.1 (master:v3.0.1-0-g26fcb1b)
Pi-hole Dashboard: v3.0.1 (master:v3.0.1-0-ge204cea)
lighttpd/1.4.35
PHP 5.6.30-0+deb8u1 (cli) (built: Apr 14 2017 16:20:58)

---= Detecting existence of /etc/pihole/setupVars.conf:

PIHOLE_INTERFACE=eth0
IPV4_ADDRESS=192.168.1.154/24
IPV6_ADDRESS=
PIHOLE_DNS_1=8.8.8.8
PIHOLE_DNS_2=8.8.4.4
QUERY_LOGGING=true
INSTALL_WEB=true

---= Detecting installed OS Distribution

PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

---= Checking processor variety

armv7l

---= Checking IPv6 Stack

IPv6 on eth0
Gravity configured for: NOT CONFIGURED

fe80::e953:1f80:3c6c:3940/64
No gateway detected.

---= Checking IPv4 Stack

IPv4 on eth0
Gravity configured for: 192.168.1.154/24

192.168.1.154/24
No gateway detected.

---= Daemon Process Information

Found user www-data with process lighttpd

---= Daemon Process Information

Found user dnsmasq with process dnsmasq

---= Daemon Process Information

Found user pihole with process pihole-FTL

---= Processes Check

Status for lighttpd daemon:
active
Status for dnsmasq daemon:
active
Status for pihole-FTL daemon:
active

---= Resolver Functions Check (IPv4)

Resolution of analytics.clickpathmedia.com from Pi-hole (127.0.0.1):
192.168.1.154

Resolution of analytics.clickpathmedia.com from Pi-hole (192.168.1.154):
192.168.1.154

Resolution of analytics.clickpathmedia.com from 8.8.8.8:
Failed to resolve analytics.clickpathmedia.com on upstream server 8.8.8.8

Pi-hole dnsmasq specific records lookups
Cache Size:
"10000"
Upstream Servers:
"8.8.4.4#53 0 0" "8.8.8.8#53 0 0"

---= Detecting existence of /etc/lighttpd/lighttpd.conf:

server.modules = (
"mod_access",
"mod_accesslog",
"mod_auth",
"mod_expire",
"mod_compress",
"mod_redirect",
"mod_setenv",
"mod_rewrite"
)
server.document-root = "/var/www/html"
server.error-handler-404 = "pihole/index.php"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
accesslog.filename = "/var/log/lighttpd/access.log"
accesslog.format = "%{%s}t|%V|%r|%s|%b"
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
$HTTP["url"] =~ "^/admin/" {
setenv.add-response-header = (
"X-Pi-hole" => "The Pi-hole Web interface is working!",
"X-Frame-Options" => "DENY"
)
}
url.rewrite = ( "^(?!/admin/)..js$" => "pihole/index.js" )
$HTTP["url"] =~ "^(?!/admin)/.
" {
setenv.add-response-header = ( "X-Pi-hole" => "A black hole for Internet advertisements." )
}
$HTTP["host"] == "pi.hole" {
$HTTP["url"] == "/" {
url.redirect = ( "" => "/admin/" )
}
}
include_shell "cat external.conf 2>/dev/null"

---= Detecting existence of /var/log/lighttpd/error.log:

2017-05-09 14:32:01: (log.c.164) server started
2017-05-09 14:32:23: (server.c.1558) server stopped by UID = 0 PID = 1
2017-05-09 14:32:24: (log.c.164) server started
2017-05-09 14:32:24: (server.c.1045) WARNING: unknown config-key: alias.url (ignored)
2017-05-09 15:13:58: https://www.google.com/ is not a valid domain
2017-05-09 15:17:05: (log.c.164) server started
2017-05-09 15:17:05: (server.c.1045) WARNING: unknown config-key: alias.url (ignored)
2017-05-09 15:17:05: (log.c.164) server started
2017-05-09 15:17:05: (server.c.1045) WARNING: unknown config-key: alias.url (ignored)

---= Detecting existence of /etc/dnsmasq.conf:

conf-dir=/etc/dnsmasq.d

---= Detecting contents of /etc/dnsmasq.d/*:

---= File /etc/dnsmasq.d/01-pihole.conf found

addn-hosts=/etc/pihole/gravity.list
addn-hosts=/etc/pihole/local.list
domain-needed
localise-queries
bogus-priv
no-resolv
server=8.8.8.8
server=8.8.4.4
interface=eth0
cache-size=10000
log-queries
log-facility=/var/log/pihole.log
local-ttl=300
log-async

---= File /etc/dnsmasq.d/README found

---= Detecting existence of /etc/pihole/whitelist.txt:

raw.githubusercontent.com
mirror1.malwaredomains.com
sysctl.org
zeustracker.abuse.ch
s3.amazonaws.com
hosts-file.net

---= Detecting existence of /etc/pihole/blacklist.txt:

r4---sn-vgqs7nez.googlevideo.com
r4.sn-vgqs7nez.googlevideo.com
www.youtube-nocookie.com
i1.ytimg.com
r17---sn-vgqsenes.googlevideo.com
r2---sn-vgqs7n7k.googlevideo.com
r1---sn-vgqsen7z.googlevideo.com
r1.sn-vgqsen7z.googlevideo.com
r20---sn-vgqs7ne7.googlevideo.com
r20.sn-vgqs7ne7.googlevideo.com

---= Detecting existence of /etc/pihole/adlists.list:

https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt

---= Analyzing gravity.list

/etc/pihole/gravity.list is 105094 lines long.

---= Analyzing pihole.log

/var/log/pihole.log is 3004 lines long.
/var/log/pihole.log is 248K.

---= Analyzing pihole-FTL.log

/var/log/pihole-FTL.log is 248 lines long.
/var/log/pihole-FTL.log is 16K.
[2017-05-09 15:18:51.095] -> Blocked DNS queries: 36
[2017-05-09 15:18:51.095] -> Unknown DNS queries: 9842
[2017-05-09 15:18:51.095] -> Unique domains: 182
[2017-05-09 15:18:51.095] -> Unique clients: 5
[2017-05-09 15:18:51.095] Successfully accessed setupVars.conf
[2017-05-09 15:18:51.096] Listening on port 4711
[2017-05-09 15:19:23.264] Notice: Increasing queries struct size from 10000 to 20000 (667.29 KB)
[2017-05-09 15:34:33.770] New client: 192.168.1.197 (5/10)
[2017-05-09 22:34:58.133] Notice: Increasing queries struct size from 20000 to 30000 (988.59 KB)
[2017-05-09 23:20:57.481] dnsmasq process restarted
[2017-05-09 23:20:57.699] Gravity list entries: 105084
[2017-05-09 23:20:57.700] Blacklist entries: 10
[2017-05-09 23:20:57.700] No wildcard blocking list present
[2017-05-09 23:21:03.327] dnsmasq process restarted
[2017-05-09 23:21:03.616] Gravity list entries: 105084
[2017-05-09 23:21:03.616] Blacklist entries: 10
[2017-05-09 23:21:03.616] No wildcard blocking list present
[2017-05-09 23:42:23.447] New client: 192.168.1.154 raspberrypi (6/10)
[2017-05-10 00:00:01.438] NOTICE: pihole.log has been flushed
[2017-05-10 00:00:01.439] Resetting internal data structure
[2017-05-10 00:00:01.439] Queries in memory before flushing: 23192
[2017-05-10 00:00:01.680] Gravity list entries: 105084
[2017-05-10 00:00:01.680] Blacklist entries: 10
[2017-05-10 00:00:01.680] No wildcard blocking list present
[2017-05-10 00:00:01.680] Reading from /var/log/pihole.log.1 (rw-r--r--)
[2017-05-10 00:00:01.680] Notice: Increasing queries struct size from 0 to 10000 (320.23 KB)
[2017-05-10 00:00:01.680] Notice: Increasing overTime struct size from 0 to 100 (323.43 KB)
[2017-05-10 00:00:01.680] Notice: Increasing forwarded struct size from 0 to 4 (323.50 KB)
[2017-05-10 00:00:01.687] New forward server: 8.8.4.4 (0/4)
[2017-05-10 00:00:01.687] Notice: Increasing domains struct size from 0 to 1000 (343.51 KB)
[2017-05-10 00:00:01.687] Notice: Increasing clients struct size from 0 to 10 (343.69 KB)
[2017-05-10 00:00:01.688] New client: 127.0.0.1 localhost (0/10)
[2017-05-10 00:00:01.694] New forward server: 8.8.8.8 (1/4)
[2017-05-10 00:00:01.699] New client: 192.168.1.1 (1/10)
[2017-05-10 00:00:04.916] New client: 192.168.1.127 (2/10)
[2017-05-10 00:00:05.466] New client: 192.168.1.152 (3/10)
[2017-05-10 00:00:06.967] New client: 192.168.1.130 (4/10)
[2017-05-10 00:00:07.351] Notice: Increasing queries struct size from 10000 to 20000 (667.43 KB)
[2017-05-10 00:00:07.749] New client: 192.168.1.197 (5/10)
[2017-05-10 00:00:15.048] Notice: Increasing queries struct size from 20000 to 30000 (988.73 KB)
[2017-05-10 00:00:16.821] New client: 192.168.1.154 raspberrypi (6/10)
[2017-05-10 00:00:37.147] Reading from /var/log/pihole.log (rw-r--r--)
[2017-05-10 01:18:07.359] dnsmasq process restarted
[2017-05-10 01:18:07.578] Gravity list entries: 105084
[2017-05-10 01:18:07.578] Blacklist entries: 10
[2017-05-10 01:18:07.578] No wildcard blocking list present
[2017-05-10 01:18:21.195] dnsmasq process restarted
[2017-05-10 01:18:21.418] Gravity list entries: 105084
[2017-05-10 01:18:21.418] Blacklist entries: 10
[2017-05-10 01:18:21.418] No wildcard blocking list present

---= pihole.log

What does

ip addr

show, and are you able to run

ping 8.8.8.8

from the Pi-hole command line?

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:92:db:00 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.154/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::e953:1f80:3c6c:3940/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:c7:8e:55 brd ff:ff:ff:ff:ff:ff
inet6 fe80::4ace:96d7:acc4:cee4/64 scope link
valid_lft forever preferred_lft forever

and ping 8.8.8.8: connect: Network is unreachable

okay, I see the problem...google dns is unreachable

The entire internet looks to be not accessible, try rebooting the device and doing the ping again.

rebooted pi, ssh into it via putty, and ran ping 8.8.8.8:

connect: Network is unreachable

Anything else I could try?

Do you have any firewalls that may be blocking the device from getting out of the local network and on to the internet?

take a look:

and:

other than the router firewall, it's just a simple home network. No additional stuff going on.
I have two routers, but the second router is irrelevant.

Can you try a traceroute 8.8.8.8 and see if it gets to the router? Also, you said you have a static lease set up for the device, try removing the lines from the bottom of /etc/dhcpcd.conf that start with the Pi-hole lines, you don't need a static address configured if you have a lease set up already.

traceroute from the pi?

if that's the case then:

traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets

connect: Network is unreachable

if from windows machine:

Looks like the Pi-hole isn't set to use the router as it's gateway. Remove that section from /etc/dhcpcd.conf and reboot.

interface eth0
  static ip_address
  static routers
  static domain_name_servers

remove which section?

interface eth0
static ip_address=192.168.1.100
static routers=
static domain_name_servers=
static domain_search=
interface eth0
static ip_address=192.168.1.154/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

remove all this?

That's the problem, your device has two directives to set IP addresses, remove all of that and reboot.

removed and reboot. what now?