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

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.

Appears to be a fairly simple format [ipAddress] [CNAME] with a single space in between. As can be seen in the gist I linked above. Might be cool to import this list like we do with blocklist.

And accessing the file via pihole commands validates the input before it's dropped in to that file. If you make a mistake when editing the file then it's going to cause FTL to crash. And people will copy/paste things in without knowing what or why, thus causing them to come to us to tell us that things are broken and we have to figure out why a file that shouldn't be modified was modified.

Maybe I can make a feature request?

Would be very similar to importing a blocklist. Can we import whitelist in the same or no?

Wouldn’t importing this list file be just as easy? In the end it does exactly what pihole -a addcustomdns does just on a larger scale.

Much like pihole -b -l is a quicker way to add sites to block pihole -a addcustomdns -l (or something) could allow for adding a whole list like this one.

Doesn’t need to be super complicated just expanding a little on what Pi-hole is already doing...

The same could be said for adding whitelists as well like was asked here.

Is it still possible to use custom.list with v5.0 of pi-hole?

1 Like

Yes it is.