SquidGuard

1 – Instale o pacote squidguard

apt-get install squidguard

2 – Adicione a seguintes entradas no squid.conf

vi /etc/squid/squid.conf

url_rewrite_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
acl rede src 192.168.0.0/24
http_access allow rede

3 – Edite o arquivo de configuração do SquidGuard assim:

vi /etc/squid/squidGuard.conf

dbhome /var/lib/squidguard/db
logdir /var/log/squid

dest porn {
domainlist porn/domains
urllist porn/urls
}

acl {
  default {
  pass !porn all
  redirect http://localhost/block.html
  }
}

4 – Crie o Ambiente dos arquivos do squidGuard

mkdir /var/lib/squidguard/db/porn/

vi /var/lib/squidguard/db/porn/urls

playboy
sexy
virtua
wnet

touch /var/lib/squidguard/db/porn/domains

5 – Crie o arquivo de “acesso negado” que será visto pelos usuários

vi /var/www/block.html

Acesso Negado!

Contate o administrador de sua rede.

6 – Inicie o squid

/etc/init.d/squid start

TESTANDO…

Tente acessar os sites bloqueados no navegador

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s