No internet, can't ping gateway, but can access over ssh on other device

Please follow the below template, it will help us to help you!

Expected Behaviour:

Expected behavior should be that I can ping 8.8.8.8 and 10.20.1.1

Actual Behaviour:

I'm unable to ping either ip as expected. The moment I point my router to the pi, neither the pi or router can ping each other. All other services work fine such as ssh, from other devices including ping. On the router when I set primary dns and leave secondary blank, secondary defaults to 0.0.0.0 and brings the internet down for the whole house. I've tried with and without dns relay enabled on the router and I'm a bit confused if I need it enabled or not, either way it doesn't help. This is also the case with either static or DHCP on the pi. I should also mention I'm running Dietpi v6.25.3 (latest version of raspbian stretch) and using dietpi-config to install pihole. Both are up to date as far as stretch goes so I don't see this being the root cause. It seems like a network collision of some sort. Could this be a conflict of both the pi and router broadcasting dns on port 53? I should note, if I modify the dns in the router to Google, etc and set the pi to DHCP, all networking services function as expected. After all, That's how I was able to install pihole to begin with along with updating beforehand. I've read similar threads but none as accurate to my issue as this one (I've ran through the post and I'm unable to ping using any of the methods provided) https://tricorder.pi-hole.net/kr31hl3n2h

Debug Token:

No net connection to provide token when issue is experienced.

Try setting the Pi-hole IP as BOTH the primary and secondary DNS OR set a second unused internal IP as you secondary

Sorry, I should have mentioned that I've tried that. Same affect as even just setting as primary. Kills the internet for the whole network. It's just strange I can't ping the gateway and the gateway can't ping the pi when I set statistic or dhcp on the pi. I've tried running pihole -r which both static and DHCP as well and still no joy.

From what device are you doing the pinging? Note that since you are pinging an IP and not a domain name, no DNS resolution is required. If you can't ping an IP, it is a connectivity problem and not a Pi-Hole problem.

First troubleshooting step I would take - manually assign a client DNS to Pi-Hole IP and see if the DNS requests from that client go to the Pi-Hole.

Pihole is getting queries but anything hard coded with 10.20.1.12 (my pi) it looses connectivity. It seems like it could be a layer one issue but that's positively ruled out so it's layer 2 or 3. Is it possible pihole is overriding my static IP settings on boot with incorrect dns settings for the pi, Or dietpi config is messing with pihole network settings?

To answer your question I'm trying to ping the router from the pi, and vice versa. Neither respond in either direction

If you are able, generate a debug log, upload it and post the token.

I most likely can but it will probably be inaccurate due to the configuration it'll be generated by. I have to set 8.8.8.8 in the router as primary dns and DHCP on the pi for the pi to have internet connection.

So, you can ping an IP address (which doesn't involve Pi-hole in any way) with a DHCP assigned IP address? Then layer 1 is confirmed working. But you can't ping and IP address with a static IP configured (via the mechanism that DietPi uses to assign IP addressing)? Then that's really looking like it's not Pi-hole but something you need to check with DietPi as to the issue. Are the IP addresses the same under both situations? Are your gateways the same under both situations? Are you running any kind of firewall or security appliance on your network?

Edit: An mtr or a trace would be helpful to see where the packets are being dropped.

What should be in my resolv.conf, network/interfaces and 01-piholedns.conf files for nameserver? I do agree that setting a static IP using the dietpi-config (which is the same as raspi-config btw) is overriding either reaolv.conf or my interfaces config file each time I reboot. If you can confirm what I should have, I think I can get it ironed out.

01-pihole has 1.1.1.1 and 1.0.0.1 as nameserver as expected. Interfaces config (set by dietpi-config) has 8.8.8.8 and resolv.conf has 127.0.0.1

01-pihole also has domain-needed uncommented, is this expected?

That line is uncommented in a Pi-Hole distribution.

Nope. Not going to buster. Too many issues.

I'm running Buster on a Pi Zero with Pi-Hole and unbound with no issues.

Does a new install of pihole consider already set static IP configuration? I'm on a 10.20.1.x/24 and pihole asks me to set a static IP upon install. Could be, dietpi-config overwrites my config of pihole if I set it before installing pi (using 8.8.8.8 as dns) which pi autodetects upon a fresh install and writes in the boot scripts?

You will have to ask DietPi what they do with the configurations and changes. It is not a stock Pi-hole install as you would get from the documented curl command and it's beyond what we can advise on.

Gotcha. So in that case, I went ahead and did a fresh install, set a static IP outside my routers DHCP range, installed pihole using curl, and the issue still persists. As soon as I point my router the pihole as the only dns, the pi looses the ability to ping the router, ping Google, but can ping my cell phone I'm using to ssh along with any other device besides the router and 8.8.8.8 or google.com I get 10.20.1.65(pihole) destination not found

If you can not ping an IP address then the problem is not with Pi-hole. Pi-hole does not change anything at the network layer that would prevent IP from working. Check /etc/dhcpcd.conf to make sure it's set, but beyond that there's really nothing we can do.

If you want to still troubleshoot then you will need to answer the questions I have asked previously: