Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pi Hole keeps cutting out #953

Closed
4 tasks done
Burdalfis opened this issue Dec 2, 2016 · 21 comments
Closed
4 tasks done

Pi Hole keeps cutting out #953

Burdalfis opened this issue Dec 2, 2016 · 21 comments

Comments

@Burdalfis
Copy link

Burdalfis commented Dec 2, 2016

In raising this issue, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your issue:

How familiar are you with the codebase?:

  • [] 1 (very unfamiliar)
  • [] 2
  • 3
  • [] 4
  • [] 5
  • [] 6
  • [] 7
  • [] 8
  • [] 9
  • [] 10 (very familiar)

[BUG | ISSUE] Expected Behaviour:

Pi Hole redirects URLs associated with ads, therefore blocking them

[BUG | ISSUE] Actual Behaviour:

Pi Hole does work, on and off. At time of writing, it isn't blocking ads, I have provided a screenshot below. However Pi Hole is reporting ads being blocked. I can access Pi Hole through http://pi.hole/admin/index.php and through SSH while it is both working and not working.

[BUG | ISSUE] Steps to reproduce:

I'm not entirely sure how anyone would replicate this, I cannot find this issue anywhere else. The steps I took to this point are installing the latest version of Raspbian, installing Pi Hole, and I started experiencing the issue. I did some googling, and I found one common issue is not having resolvconf installed, so I installed that, and that fixed everything for a little while, but the problem persists.

(Optional) Debug Log generated by pihole -d:

http://pastebin.com/0Mjg9ZMB
http://imgur.com/a/wi5CK

@dschaper
Copy link
Member

dschaper commented Dec 2, 2016

Can you re-run pihole -d and when the instructions say to browse with a client, try viewing a few sites and then hit CTRL-C to stop the log collection. This will give you the option to upload the logs to us and give you a token to let us know which log is yours.

@dschaper
Copy link
Member

dschaper commented Dec 2, 2016

Also, how do you have the clients set up to receive the DNS address of the Pi-hole? Are you using DHCP, and do you have a secondary DNS set up to go to the clients?

@Burdalfis
Copy link
Author

Burdalfis commented Dec 2, 2016

Here is my token, Pi Hole is actually working now, I refreshed http://ads-blocker/testing/ three times and all three times I saw no ads. I will give pihole -d another go when it stops working again.

I have set up my router's primary DNS server to the router-set raspberry pi static IP of 192.168.100.2, and I have updated my imgur link above to contain a screenshot of my router's settings.

EDIT: Forgot my token. Here it is: va6dsh9maw

@dschaper
Copy link
Member

dschaper commented Dec 2, 2016

The debug looks good, let us know if it starts to let ad's through again and well take a look.

@Burdalfis
Copy link
Author

Alrighty, Will do. Thanks for the excellent response!

@Burdalfis
Copy link
Author

Aha! It's cut out! I also cannot access it via http://pi.hole/admin/index.php but I can via <pi's IP>/admin.

Here is my debug token for three reloads on http://ads-blocker.com/testing/
270q7tic81

@DL6ER
Copy link
Member

DL6ER commented Dec 2, 2016

I also cannot access it via http://pi.hole/admin/index.php but I can via <pi's IP>/admin

That sound like the Pi-Hole is not your (primary) DNS server as the Pi-Hole would be able to resolve pi.hole to <pi's IP>. Besides that. accessing it via its IP directly will always work, even if the computer doesn't use any of its ad-blocking capabilities.

@Burdalfis
Copy link
Author

Yeah that makes sense. However in my image above my Pi is clearly set to my main DNS server, I wonder if my router is switching off it for some reason

@AzureMarker
Copy link
Contributor

Your settings show that you have set a secondary DNS server. Some routers/devices will do a round-robin on DNS servers, sometimes using the first and sometimes the second. This might be happening to you. Try removing the second DNS server.

@Burdalfis
Copy link
Author

Unfortunately the second DNS server field is empty in the settings, I guess it just chose the best one to put there and did so. What should I put there? I have another Raspberry Pi, but it's one of the original B models when Raspberry Pi was new, and my current Pi-Hole Pi is a Pi3

@AzureMarker
Copy link
Contributor

AzureMarker commented Dec 3, 2016

One of your images showed a second. If the Pi-hole is the only server, then all devices should be using the Pi-hole. You should only need one Pi-hole.

@Burdalfis
Copy link
Author

Yeah it's strange, on the left on the second image is my homescreen for my router, and the middle are the DHCP settings, some of them, at least. If I don't define a second IP, it'll round robin between my first IP and a random working DNS pre-programmed into the router, I believe. I have tried pointing the router back to itself or my PC which has a static IP, making it create an error and switch back to the first DNS server, but that failed too.

@AzureMarker
Copy link
Contributor

Odd. Can you set both primary and secondary to the same Pi-hole?

@Burdalfis
Copy link
Author

Unfortunately not, it won't let me input an invalid IP or the same IP

@DL6ER
Copy link
Member

DL6ER commented Dec 3, 2016

What do you mean by invalid? Does it check if the IP corresponds to a real DNS server? If not, you could try setting your other Pi as secondary DNS server. This will not solve the issue but may help with debugging.

@Burdalfis
Copy link
Author

Invalid such as 0.0.0.0 and whatnot, IPs that point nowhere. I'm probably going to hook up my second Pi tomorrow and point my router there, see if that fixes my problems. I think my router switches between the two IPs regularly, and if I don't input an IP it chooses one from a list and uses it, as seen from my image of the homescreen. So if both IPs it uses are both pi-holes then it should just switch between the two and block ads no matter what.

@DL6ER
Copy link
Member

DL6ER commented Dec 3, 2016

My question was just: What if the second server you supply is no DNS server at all? Might happen that you just cannot load pages sometimes. However, in the cases where pages actually load there should be no ads there.

@Burdalfis
Copy link
Author

Hmm. I tried pointing the router to itself, I put 192.168.100.1 into the secondary DNS server settings, and the same behavior was observed. I didn't see ads for a while, they came back, and then they stopped showing up again, and it repeated. I do have the router all the devices are connected to plugged into another router, the chain goes: Internet -> Router #1 -> Router #2 -> All devices. The first router had super spotty wifi, so I got another, and so I could still connect to all my devices on ethernet via wifi and vice versa I used just router #2, could that be potentially be causing issues?

@dschaper
Copy link
Member

Will close this unless there are further issues to discuss.

@Burdalfis
Copy link
Author

Yeah I've got it all figured out, I didn't configure my devices correctly. Thanks!

@dschaper
Copy link
Member

Thanks! Let us know if you run into any other issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants