Would it be possible to enforce Safe Search via /etc/pihole/custom.list?

Would it be possible to enforce Safe Search via /etc/pihole/custom.list?


Feature Request cause I feel like more people would be able enforce Safe Search for Google, Bing, DuckDuckGo, YouTube and other site easier for everyone that uses and maybe some that don’t that would like to.

So the custom.list option won’t work?

If you put the dnsmasq entries in a custom list, they should be in /etc/dnsmasq.d, not in /etc/pihole

Putting them in /etc/dnsmasq.d achieves the same effect as making changes in /etc/hosts

I was just wondering if I could take advantage of p/r 2978 by using /etc/pihole/custom.list. Would that accomplish the same thing with less formatting required on my part? I could just make a .list file like this?

That feature is currently only in the development version of Pi-hole, whilst it’s generally OK, I wouldn’t recommend switching from master to development for full time usage.

Hopefully we will have a beta round at some point in the near future, though no promises that it will make it in! As ever though, no timeframes on new releases/betas.

In the mean time, your only option is to use the methods as described in the links above, I’m afraid.

Been using development for a few months now with little to no issue tbh.

Fair, just as long as you keep in mind that it is prone to break at any time. If you’re comfortable with troubleshooting issues to see why they are broken, then development is ok.

I just wouldn’t recommend it for everyone

1 Like

So will the scenario I’ve presented work?

To be honest, not having a need for it, I have never looked into enforcing safe-search on my network.

I guess in this case there is one way to find out, and that is to try it!

1 Like

I have tested via nslookup and it returns the IP address that corresponds to the CNAME in custom.list just not sure how to go about testing the search engine.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged) duckduckgo.com www.duckduckgo.com duck.com www.duck.com

Put that in the file (might have to create it) /etc/pihole/custom.list

Here’s a custom.list that should work for safe search. Just add it to /etc/pihole as custom.list

Why in that location and not in /etc/dnsmasq.d with the other dnsmasq configuration files?

Didn’t know those file where interchangeable?

Also the p/r OP references uses that file for the information it saves. And the few hours I’ve been using everything is work as it should.

Not sure advantages of one vs. the other so I can’t argue that point at all…

custom.list is not default part of Pi-hole.
Have a look here bout similar lan.list:

So I’m not supposed to edit that file? Cause that’s the file that pihole -a addcustomdns uses.

Easier to import 200+ entries in a file than adding one by one via cli.

My mistake, your probably on development Branch.

If it’s a file that is edited/used by a pihole command then it’s intended to be used only by pihole commands. If you manually edit files and change things we can’t know if you did it right.