I use dansguardian on my firewall at home to keep out offensive stuff from the Internet.
I downloaded blocklists a couple of years ago, and because it is mainly content based, I have adjusted it a little, but it still works very well.
It came with a set of regular expressions to force major search engines to use safe search when searching for images, but I noticed recently that some recent changes at google broke this feature.
I got a new one working (it does catch all searches, and not just images. If someone were to narrow it to work on image and videos, feel free to post a comment)
In the process I noticed that there was nothing filtering bing searches, (heaven knows why one would use bing, but best to be thorough).
Also important is that this method helps with ssl encrypted searches, which are otherwise hard to block.
In the hope that this will be helpful to someone else:
add the following to /etc/dansguardian/lists/urlregexplist (it might be in a different folder, but the name of the file will be urlregexplist)
#for google
#we add &safe=vss to the end of every search
"(^http[s]?://[0-9a-z]+\.google\.[a-z]+[-/%.0-9a-z]*/search\?.*)"->"\1&safe=vss"
#for bing
#similar, but &adlt=strict is the keyword
"(http[s]?://[0-9a-z]+.bing.com/images/search\?.*)"->"\1&adlt=strict"
hope that helps!
I downloaded blocklists a couple of years ago, and because it is mainly content based, I have adjusted it a little, but it still works very well.
It came with a set of regular expressions to force major search engines to use safe search when searching for images, but I noticed recently that some recent changes at google broke this feature.
I got a new one working (it does catch all searches, and not just images. If someone were to narrow it to work on image and videos, feel free to post a comment)
In the process I noticed that there was nothing filtering bing searches, (heaven knows why one would use bing, but best to be thorough).
Also important is that this method helps with ssl encrypted searches, which are otherwise hard to block.
In the hope that this will be helpful to someone else:
add the following to /etc/dansguardian/lists/urlregexplist (it might be in a different folder, but the name of the file will be urlregexplist)
#for google
#we add &safe=vss to the end of every search
"(^http[s]?://[0-9a-z]+\.google\.[a-z]+[-/%.0-9a-z]*/search\?.*)"->"\1&safe=vss"
#for bing
#similar, but &adlt=strict is the keyword
"(http[s]?://[0-9a-z]+.bing.com/images/search\?.*)"->"\1&adlt=strict"
hope that helps!