First of all make sure you installed squidGuard perfectly and squid server is working (How to install squidGuard ). There could be also other reason that effect squidGuard few are as below.
first check all the files paths mentioned in squidGuard.conf are correct and those files are available then run try to update squidGuard db with below command, if there are any error it will display.
which means file name different from the file that exists in blacklists or the file doesn't exist.
So rectify it , if there are no errors displayed check squidGuard database directory permissions normally group ownership should be set to squid or else it wont work.
Don't forget to update db and restart squid after every change you do or else it doesn't get reflected and don't show up.
Fianlly try to re install it see how to install squidGuard here.
- syntax , file paths and names are incorrect in squidGuard.conf
- user and group permissions for squidGuard are not set or wrongly set
- redirect URL set wrong or not working
first check all the files paths mentioned in squidGuard.conf are correct and those files are available then run try to update squidGuard db with below command, if there are any error it will display.
[root@ns blacklists]# vim /etc/squid/squidGuard.conf
[root@ns blacklists]# squidGuard -bdC all
2014-01-01 20:22:01 [25661] New setting: dbhome: /var/squidGuard/blacklists
2014-01-01 20:22:01 [25661] New setting: logdir: /var/log/squidGuard
2014-01-01 20:22:01 [25661] init domainlist /var/squidGuard/blacklists/porn/domains
Processing file and database /var/squidGuard/blacklists/porn/domains
[==================================================] 100 % done
2014-01-01 20:22:28 [25661] create new dbfile /var/squidGuard/blacklists/porn/domains.db
2014-01-01 20:22:29 [25661] init urllist /var/squidGuard/blacklists/porn/urls
Processing file and database /var/squidGuard/blacklists/porn/urls
[==================================================] 100 % done
2014-01-01 20:22:30 [25661] create new dbfile /var/squidGuard/blacklists/porn/urls.db
2014-01-01 20:22:30 [25661] init domainlist /var/squidGuard/blacklists/proxy/domain
2014-01-01 20:22:30 [25661] /var/squidGuard/blacklists/proxy/domain: No such file or directory
2014-01-01 20:22:30 [25661] Going into emergency mode
at the end you can see errors for this instance it says /var/squidGuard/blacklists/proxy/domain: No such file or directory [root@ns blacklists]# squidGuard -bdC all
2014-01-01 20:22:01 [25661] New setting: dbhome: /var/squidGuard/blacklists
2014-01-01 20:22:01 [25661] New setting: logdir: /var/log/squidGuard
2014-01-01 20:22:01 [25661] init domainlist /var/squidGuard/blacklists/porn/domains
Processing file and database /var/squidGuard/blacklists/porn/domains
[==================================================] 100 % done
2014-01-01 20:22:28 [25661] create new dbfile /var/squidGuard/blacklists/porn/domains.db
2014-01-01 20:22:29 [25661] init urllist /var/squidGuard/blacklists/porn/urls
Processing file and database /var/squidGuard/blacklists/porn/urls
[==================================================] 100 % done
2014-01-01 20:22:30 [25661] create new dbfile /var/squidGuard/blacklists/porn/urls.db
2014-01-01 20:22:30 [25661] init domainlist /var/squidGuard/blacklists/proxy/domain
2014-01-01 20:22:30 [25661] /var/squidGuard/blacklists/proxy/domain: No such file or directory
2014-01-01 20:22:30 [25661] Going into emergency mode
which means file name different from the file that exists in blacklists or the file doesn't exist.
So rectify it , if there are no errors displayed check squidGuard database directory permissions normally group ownership should be set to squid or else it wont work.
[root@ns squid]# ls -l /var/squidGuard/*
/var/squidGuard/blacklists:
total 60
drwxr-xr-x 2 root root 4096 Dec 31 19:51 ads
drwxr-xr-x 2 root root 4096 Dec 31 16:10 aggressive
drwxr-xr-x 2 root root 4096 Jan 1 15:07 allow
drwxr-xr-x 2 root root 4096 Dec 31 16:10 audio-video
drwxr-xr-x 2 root root 4096 Dec 31 16:10 drugs
drwxr-xr-x 2 root root 4096 Dec 31 16:10 gambling
drwxr-xr-x 2 root root 4096 Dec 31 16:10 hacking
drwxr-xr-x 2 root root 4096 Dec 31 16:10 mail
drwxr-xr-x 2 root root 4096 Jan 1 16:56 porn
drwxr-xr-x 2 root root 4096 Jan 1 20:22 proxy
drwxr-xr-x 2 root root 4096 Dec 31 16:10 redirector
drwxr-xr-x 2 root root 4096 Dec 31 16:10 spyware
drwxr-xr-x 2 root root 4096 Dec 31 16:10 suspect
drwxr-xr-x 2 root root 4096 Dec 31 16:10 violence
drwxr-xr-x 2 root root 4096 Dec 31 16:10 warez
see group owner ship is root so squid can't access this directory and it wont work set ownership to squid./var/squidGuard/blacklists:
total 60
drwxr-xr-x 2 root root 4096 Dec 31 19:51 ads
drwxr-xr-x 2 root root 4096 Dec 31 16:10 aggressive
drwxr-xr-x 2 root root 4096 Jan 1 15:07 allow
drwxr-xr-x 2 root root 4096 Dec 31 16:10 audio-video
drwxr-xr-x 2 root root 4096 Dec 31 16:10 drugs
drwxr-xr-x 2 root root 4096 Dec 31 16:10 gambling
drwxr-xr-x 2 root root 4096 Dec 31 16:10 hacking
drwxr-xr-x 2 root root 4096 Dec 31 16:10 mail
drwxr-xr-x 2 root root 4096 Jan 1 16:56 porn
drwxr-xr-x 2 root root 4096 Jan 1 20:22 proxy
drwxr-xr-x 2 root root 4096 Dec 31 16:10 redirector
drwxr-xr-x 2 root root 4096 Dec 31 16:10 spyware
drwxr-xr-x 2 root root 4096 Dec 31 16:10 suspect
drwxr-xr-x 2 root root 4096 Dec 31 16:10 violence
drwxr-xr-x 2 root root 4096 Dec 31 16:10 warez
[root@ns squid]# chown -R squid /var/squidGuard/*
[root@ns blacklists]# ls -l /var/squidGuard/*
total 60
drwxr-xr-x 2 squid root 4096 Dec 31 19:51 ads
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 aggressive
drwxr-xr-x 2 squid root 4096 Jan 1 15:07 allow
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 audio-video
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 drugs
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 gambling
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 hacking
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 mail
drwxr-xr-x 2 squid root 4096 Jan 1 16:56 porn
drwxr-xr-x 2 squid root 4096 Jan 1 20:22 proxy
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 redirector
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 spyware
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 suspect
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 violence
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 warez
now restart squid service and check. if issue still persists check redirect URL is set properly.[root@ns blacklists]# ls -l /var/squidGuard/*
total 60
drwxr-xr-x 2 squid root 4096 Dec 31 19:51 ads
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 aggressive
drwxr-xr-x 2 squid root 4096 Jan 1 15:07 allow
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 audio-video
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 drugs
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 gambling
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 hacking
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 mail
drwxr-xr-x 2 squid root 4096 Jan 1 16:56 porn
drwxr-xr-x 2 squid root 4096 Jan 1 20:22 proxy
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 redirector
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 spyware
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 suspect
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 violence
drwxr-xr-x 2 squid root 4096 Dec 31 16:10 warez
[root@ns squid]# vim /etc/squid/squidGuard.conf
acl {
default {
pass allow !porn !proxy !allow !in-addr all
redirect http://www.geekinlinux.com/ERR/access_denied.html
### redirect https://www.google.co.in
}
}
check if http://www.geekinlinux.com/ERR/access_denied.html is working i mean your URL or else to narrow it down simply replace it with https://www.google.co.in and check it , it should redirect to google when you try to access any site listed in blacklists.acl {
default {
pass allow !porn !proxy !allow !in-addr all
redirect http://www.geekinlinux.com/ERR/access_denied.html
### redirect https://www.google.co.in
}
}
Don't forget to update db and restart squid after every change you do or else it doesn't get reflected and don't show up.
Fianlly try to re install it see how to install squidGuard here.
0 Comments