{"id":201,"date":"2017-08-11T14:11:02","date_gmt":"2017-08-11T14:11:02","guid":{"rendered":"http:\/\/info.ffteixeira.net\/2017\/08\/11\/install-squidguard-at-debian-9\/"},"modified":"2017-08-11T14:11:02","modified_gmt":"2017-08-11T14:11:02","slug":"install-squidguard-at-debian-9","status":"publish","type":"post","link":"https:\/\/blog.ffteixeira.net\/?p=201","title":{"rendered":"install SquidGuard! at debian 9"},"content":{"rendered":"<p>Install SquidGuard!<br \/>1. sudo apt-get install squidguard<br \/>2. sudo mkdir \/opt\/3rdparty<br \/>3. cd \/opt\/3rdparty&nbsp;&nbsp; &nbsp;<br \/>We are going to use the list from shalalist.de for &ldquo;testing&rdquo;, since it&rsquo;s 100% free for non-commerical.&nbsp; For a bigger and much more through blacklist, I use http:\/\/urlblacklist.com\/. It&rsquo;s free to try once, and has different pricing tiers for person\/school\/business.<br \/>3. sudo wget http:\/\/www.shallalist.de\/Downloads\/shallalist.tar.gz<br \/>4. sudo tar xzf shallalist.tar.gz<br \/>5. sudo cp -a \/opt\/3rdparty\/BL\/porn \/var\/lib\/squidguard\/db<br \/>&nbsp;&nbsp; &nbsp;sudo cp -a \/opt\/3rdparty\/BL\/adv \/var\/lib\/squidguard\/db<br \/>&nbsp;&nbsp; &nbsp;sudo cp -a \/opt\/3rdparty\/BL\/spyware \/var\/lib\/squidguard\/db<\/p>\n<p>6. Add this to&nbsp; \/etc\/squid3\/squid.conf , type &ldquo;sudo nano \/etc\/squid3\/squid.conf&rdquo;<br \/>url_rewrite_program \/usr\/bin\/squidGuard &ndash;c \/etc\/squidguard\/squidGuard.conf<br \/>7. sudo squidGuard -C all<br \/>8. chown -R proxy:proxy \/var\/lib\/squidguard\/db<\/p>\n<p>Edit the squidGuard.conf<\/p>\n<p>Backup of your squidGuard.conf then making a new one..<br \/>1. sudo cp \/etc\/squidguard\/squidGuard.conf \/etc\/squidGuard.conf.bak<br \/>2. sudo rm \/etc\/squidguard\/squidGuard.conf<br \/>3.sudo nano \/etc\/suqidgurd\/squidGuard.conf<br \/>Copy and paste this,<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;squidGuard.conf&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/><em>#<br \/># CONFIG FILE FOR SQUIDGUARD<br \/>#<br \/>dbhome \/var\/lib\/squidguard\/db<br \/>logdir \/usr\/local\/squidGuard\/logs<br \/>&nbsp;&nbsp; &nbsp;dest porn {<br \/>&nbsp;&nbsp; &nbsp;domainlist porn\/domains<br \/>&nbsp;&nbsp; &nbsp;urllist porn\/urls<br \/>}<br \/>dest adv {<br \/>&nbsp;&nbsp; &nbsp;domainlist adv\/domains&nbsp;&nbsp; &nbsp;<br \/>&nbsp;&nbsp; &nbsp;urllist adv\/urls<br \/>}<br \/>dest spyware {<br \/>&nbsp;&nbsp; &nbsp;domainlist spyware\/domains<br \/>&nbsp;&nbsp; &nbsp;urllist spyware\/urls<br \/>}<br \/>acl {<br \/>&nbsp;&nbsp; &nbsp;default {<br \/>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pass !porn !adv !spyware all<br \/>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;redirect http:\/\/localhost\/block.html<br \/>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br \/>}<\/em><br \/>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>You can test your squidguard by doing a dry run<br \/>sudo echo &quot;http:\/\/www.pornhub.com 10.50.55.10\/- &#8211; GET&quot; | squidGuard -c \/etc\/squidguard\/squidGuard.conf &ndash;d<\/p>\n<p>You should see,<br \/>squidGuard ready for requests<br \/>squidGuard stopped<br \/>If there are errors, it will tell you.. The most likely errors you&rsquo;ll run into are permission issues.. If it gives you permission issues with your database, make sure that you set the user and group named &ldquo;proxy&rdquo; ownership. You can tell that by &ldquo;sudo ls -l \/var\/lib\/squidguard\/db*&rdquo;<\/p>\n<p>You can now use the Firefox browser you setup to use with your proxy server to make sure you are blocking porn and ads. For better protection, I recommend using the blacklist from,&nbsp; http:\/\/urlblacklist.com\/<\/p>\n<p>Finish with:<br \/>cd \/var\/lib\/squidguard\/db\/; squidGuard -C all ; chown proxy:proxy -R \/var\/lib\/squidguard\/db\/ ; squid -k reconfigure;&nbsp; service squid restart<\/p>\n<p><a href=\"https:\/\/www.neowin.net\/forum\/topic\/1272584-guide-setup-squid-and-squidguard-with-ubuntu-server-14041-lts\/\" target=\"_blank\" rel=\"noopener noreferrer\">Credits<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install SquidGuard!1. sudo apt-get install squidguard2. sudo mkdir \/opt\/3rdparty3. cd \/opt\/3rdparty&nbsp;&nbsp; &nbsp;We are going to use the list from shalalist.de for &ldquo;testing&rdquo;, since it&rsquo;s 100% free for non-commerical.&nbsp; For a bigger and much more through blacklist, I use http:\/\/urlblacklist.com\/. It&rsquo;s &hellip; <a href=\"https:\/\/blog.ffteixeira.net\/?p=201\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[36,38],"class_list":["post-201","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-squid","tag-squidguard"],"_links":{"self":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=201"}],"version-history":[{"count":0,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/201\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}