I just installed the latest XS 0.6d2, and in addition to setting up OpenDNS in named-xs.conf to do the usual filtering, hunted around to find an easy way to enforce safe Google image searches, as that seems to be an issue.<br>
<br>Looks like squid can block urls via regular expressions. I created a file named /etc/squid/blacklisted_sites.txt consisting of:<br><br><a href="http://images.google.com/preferences">http://images.google.com/preferences</a><br>
<a href="http://images.google.com/advanced_image_search">http://images.google.com/advanced_image_search</a><br>safe=off<br><br>and added the following lines to /etc/squid/<a href="http://squid-xs.conf.in">squid-xs.conf.in</a> at the beginning of their respective sections.<br>
<br>acl blacklist_sites url_regex "/etc/squid/blacklisted_sites.txt"<br><br>http_access deny blacklist_sites<br><br>Then, of course,<br><br>make -f /etc/xs-config.make squid-xs.conf<br><br>And then<br><br>/etc/sysconfig/olpc-scripts/TURN_SQUID_ON<br>
<br>So now when I attempt to turn off safe search, squid gives me access denied. A <b>horrible</b> issue was when I tested what would happen if I "came to school" with safe search already off in my cookie. Well, it doesn't block the first results page as Google doesn't put safe=off in the url string, but it does block the next page. Small comfort if you're the teacher with that kid in your class, though. Oh, only one page of nasty thumbnails. That's not disruptive at all.<br>
<br>It blocks the preferences page link from the image results as well, so you're stuck with whatever you connected to the XS with, even if that happens to allow the depraved corners of the internet. We can't help what kids do at home, though.<br>
<br>I don't know if safe=off is the best thing to block on, as there might be some legitimate sites with that string in the URL, but somehow I doubt it.<br><br>The non XS specific part of the instructions came from <a href="http://learnlinux.tsf.org.za/courses/build/electives/ch03s03.html">http://learnlinux.tsf.org.za/courses/build/electives/ch03s03.html</a><br>
<br>I sure hope someone out there has a better idea.<br><br>Anna Schoolfield<br>Birmingham<br><br>