Image blocking from search engines using squid and dansguardian



  • Hello Forum,
    I am trying to provide high speed internet access to the school children which will be helpful for them to gather many information.
    I don't want them access the adult content websites and access to those websites can be blocked by adding them in blacklists.
    But, I want grey-out the adult content images from the search engines which are loaded.  I don't want to block the educational content images, for example if I want to search images for satellites, then the image should be loaded. But, if I want to search images for porn or violence, those images should be blocked. Is their any possibility to filter out those images using squid or dansguardian. if yes, then in what way I need to configure it.



  • SquidGuard allows you to enforce safesearch in conjunction with Google, Bing or Yahoo.  I don't know much about DansGuardian but from what I've read, it supposedly has better content-control than SquidGuard.



  • In dansguardian you can do URL modifications to force safesearch. It comes pre-configured with ones that are appropriate for the most popular search engines.

    However, the big problem lately is that most search engines are switching to HTTPS based search. You will have to set the browser proxy to point to DG (i.e. you cannot transparently redirect) if you want to do URL modification for HTTPS search engines. You can set the browser proxy setting directly or use a wpad file to set it.



  • Sir is it possible to redirect www.google.com(https) to www.safesearchlive.com(http) using squidGuard or dansguardian? safesearchlive.com comes with the google safesearch enabling so it'll be the better to redirect the url itself.


  • Moderator

    @networkinggeek:

    Sir is it possible to redirect www.google.com(https) to www.safesearchlive.com(http) using squidGuard or dansguardian? safesearchlive.com comes with the google safesearch enabling so it'll be the better to redirect the url itself.

    You should be able to do that with Services:DNS Forwarder

    And use a Host Override entry



  • @BBcan177:

    @networkinggeek:

    Sir is it possible to redirect www.google.com(https) to www.safesearchlive.com(http) using squidGuard or dansguardian? safesearchlive.com comes with the google safesearch enabling so it'll be the better to redirect the url itself.

    You should be able to do that with Services:DNS Forwarder

    And use a Host Override entry

    Hi sir the webpage is getting redirected to the www.safesearchlive.com. But I am not able to search information because safesearchlive.com is fetching info for search from google.com. Even though i added google.com to the whitelist category, the result is same.
    Sir any clue where I might have erred in the configuration?



  • @osaka26:

    Enable DNS Resolver, Host Overrides; add; on host: www; Domain: google.com; ip address: 216.239.32.20; Save, then ipconfig /flushdns and voila google safesearch on all lan!

    ![host safesearch.png](/public/imported_attachments/1/host safesearch.png)
    ![host safesearch.png_thumb](/public/imported_attachments/1/host safesearch.png_thumb)