I am currently working on a project which is creating a proxy server with Squid on CentOS 6. We also want to redirect unwanted URL using SquidGuard. Currently we have had Squid working perfectly fine, and we installed SquidGuard. Using commands like
Code: Select all
echo "http://www.banquepopulaire.fr 50.50.11.11/ - - GET" | squidGuard -c /etc/squid/squidGuard.conf -d
Here is the squidGuard.conf file :
Code: Select all
#
# CONFIG FILE FOR SQUIDGUARD
#
dbhome /var/squidGuard/db
logdir /var/log/squidGuard
#
# SOURCE ADDRESSES:
#
src admin {
ip 50.50.11.178
}
# DESTINATION CLASSES:
dest adult {
domainlist blacklists/porn/domains
urllist blacklists/porn/urls
expressionlist blacklists/porn/expressions
redirect http://admin.foo.bar.de/cgi/blocked?clientaddr=%a+clientname=%n+clientuser=%i+clientgroup=%s+targetgroup=%t+url=%u
}
dest bank {
domainlist blacklists/bank/domains #L'emplacement du fichier bloquant les domaines
urllist blacklists/bank/urls #L'emplacement du fichier bloquant les urls
redirect htttp://youtube.com
}
acl {
default {
pass !bank !adult all
redirect http://www.google.fr
}
}
Code: Select all
http_port 8080
visible_hostname YVTL511021
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
#Authentification
auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/users
auth_param basic children 10
auth_param basic realm Connection au Squid sur Proxy X
auth_param basic credentialsttl 3 hours
#acl vl311 proxy_auth REQUIRED
acl vl311 src 50.50.11.0/24
http_access allow vl311
http_access allow all
# And finally deny all other access to this proxy
#http_access deny all
#url_rewrite_program /root/file.py
url_rewrite_access allow vl311
url_rewrite_bypass off
url_rewrite_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
url_rewrite_children 1
redirect_program squidGuard -c /etc/squid/squidGuard.conf
debug_options ALL,1 29,1
Code: Select all
2015-02-10 13:43:29 [26773] init domainlist /var/squidGuard/db/blacklists/porn/domains
2015-02-10 13:43:29 [26773] /var/squidGuard/db/blacklists/porn/domains: Permission denied
2015-02-10 13:43:29 [26773] Going into emergency mode
2015/02/10 13:43:29| Accepting HTTP connections at [::]:8080, FD 32.
2015/02/10 13:43:29| HTCP Disabled.
2015/02/10 13:43:29| Loaded Icons.
2015/02/10 13:43:29| Ready to serve requests.
2015/02/10 13:46:19| WARNING: All redirector processes are busy.
2015/02/10 13:46:19| WARNING: 1 pending requests queued
2015/02/10 13:46:19| Consider increasing the number of redirector processes in your config file.
Code: Select all
chown -R squid:squid /var/squidGuard/
I didn't managed to understand what was wrong with those files or the rights given to squid, so I thought maybe i could use your help.
Thank you in advance.