Solved

CentOS - Squid + SquidGuard

Posted on 2011-09-09
10
1,471 Views
Last Modified: 2012-05-12
I have a sever with SQUID + SQUIDGUARD in CentOS, but squidguard doesn´t block URL. I received information that "emergency mode".
I apply all configuration that URL https://help.ubuntu.com/community/SquidGuard , but not resolve my problem.
What can I do to resolve this problem?
Regards,
Marcelo
0
Comment
Question by:fmarcelo14
  • 5
  • 4
10 Comments
 
LVL 11

Expert Comment

by:Ove
Comment Utility
what do you mean by " I received information that "emergency mode"." ???
What are the logs telling ?

Ove
0
 

Author Comment

by:fmarcelo14
Comment Utility
Squidguard not block and not redirect navegation to URL block.
And I received log:
login as: root
root@10.7.0.16's password:
Last login: Fri Sep  9 12:43:34 2011 from spmob297.klabin.net
[root@masrv044 ~]# tail -f /var/log/squidguard/squidGuard.log
2011-09-11 04:02:05 [16153] Added UserList source: rmfilho
2011-09-11 04:02:05 [16153] Added UserList source: fdeganutti
2011-09-11 04:02:05 [16153] Added UserList source: gcosta
2011-09-11 04:02:05 [16153] Added UserList source: mnbahena
2011-09-11 04:02:05 [16153] Added UserList source: lilian
2011-09-11 04:02:05 [16153] Added UserList source: fbertoni
2011-09-11 04:02:05 [16153] Added UserList source: validacao
2011-09-11 04:02:05 [16153] init domainlist /var/lib/squidguard/ads/domains
2011-09-11 04:02:05 [16153] /var/lib/squidguard/ads/domains: Permission denied
2011-09-11 04:02:05 [16153] going into emergency mode
0
 
LVL 11

Expert Comment

by:Ove
Comment Utility
pls check owner-info on  /var/lib/squidguard/ads/domains
i would suggest a
chown -R <UsernameOfYourSquidGuardUser>:<GroupnameOfYourSquidGuardUser> /var/lib/squidguard

Ove
0
 

Author Comment

by:fmarcelo14
Comment Utility
Not resolved.

Permissions:
[root@masrv044 ~]# cd /var/lib/squidguard
[root@masrv044 squidguard]# ls -la
total 116
drwxrwxr-x+ 14 squid squid 4096 Sep  1 11:29 .
drwxr-xr-x  32 root  root  4096 Sep  1 09:24 ..
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 ads
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 adult
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 aggressive
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 audio-video
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 drugs
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 forums
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 gambling
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 hacking
lrwxrwxrwx   1 squid squid   17 Sep  1 11:29 local -> /etc/squid/local/
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 mail
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 proxy
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 violence
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 warez
[root@masrv044 squidguard]# cd ads
[root@masrv044 ads]# ls -la
total 96
drwxrwxr-x+  2 squid squid  4096 Sep  1 11:29 .
drwxrwxr-x+ 14 squid squid  4096 Sep  1 11:29 ..
-rw-rwx---+  1 squid squid  4623 Mar 31  2010 domains
-rw-rwx---+  1 squid squid 20480 Sep  2 06:33 domains.db
-rw-rwx---+  1 squid squid    68 Mar 31  2010 expressions
-rw-rwx---+  1 squid squid  4988 Mar 31  2010 urls
-rw-rwx---+  1 squid squid 20480 Sep  2 06:33 urls.db
[root@masrv044 ads]#


Log of error:
login as: root
root@10.7.0.16's password:
Access denied
root@10.7.0.16's password:
Last login: Mon Sep 12 14:45:03 2011 from 10.22.7.16
[root@masrv044 ~]# chown -R squid:squid /var/lib/squidguard
[root@masrv044 ~]# service squid restart
Stopping squid: ................                           [  OK  ]
Starting squid: .                                          [  OK  ]
[root@masrv044 ~]# tail -f /var/log/squidguard/squidGuard.log
2011-09-13 16:28:26 [30936] Added UserList source: rmfilho
2011-09-13 16:28:26 [30936] Added UserList source: fdeganutti
2011-09-13 16:28:26 [30936] Added UserList source: gcosta
2011-09-13 16:28:26 [30936] Added UserList source: mnbahena
2011-09-13 16:28:26 [30936] Added UserList source: lilian
2011-09-13 16:28:26 [30936] Added UserList source: fbertoni
2011-09-13 16:28:26 [30936] Added UserList source: validacao
2011-09-13 16:28:26 [30936] init domainlist /var/lib/squidguard/ads/domains
2011-09-13 16:28:26 [30936] /var/lib/squidguard/ads/domains: Permission denied
2011-09-13 16:28:26 [30936] going into emergency mode
0
 
LVL 11

Expert Comment

by:Ove
Comment Utility
Your filepermissions (chmod) are definitely WRONG!
dir's should have drwxr-xr-x and files should have: -rw-r--r--

Look at mine:
XDEB01:/var/lib/squidguard/db# ls -la
insgesamt 25704
drwxrws--- 36 proxy proxy    4096 15. Jul 2010  .
drwxr-xr-x  4 root  root     4096 15. Jul 2010  ..
-rw-r--r--  1 proxy proxy 3150873 15. Jul 2010  20070227165821_fr.tar.gz
-rw-r--r--  1 proxy proxy  335999 15. Jul 2010  20070227165821_sg.tar.gz
-rw-r--r--  1 proxy proxy 3166556 15. Jul 2010  20070228091046_fr.tar.gz
-rw-r--r--  1 proxy proxy 8125414 15. Jul 2010  20070228091046_shalla.tar.gz
-rw-r--r--  1 proxy proxy 3166556 15. Jul 2010  20070228091946_fr.tar.gz
-rw-r--r--  1 proxy proxy 8125414 15. Jul 2010  20070228091946_shalla.tar.gz
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  adv
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  aggressive
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  automobile
drwxr-x--- 32 proxy proxy    4096 15. Jul 2010  BL
drwxr-sr-x  2 proxy proxy    4096 10. Nov 2010  black
drwxr-sr-x 14 proxy proxy    4096 15. Jul 2010  blacklists
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  chat
-rw-r--r--  1 proxy proxy     630 15. Jul 2010  COPYRIGHT
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  dating
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  drugs
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  dynamic
drwxr-xr-x  5 proxy proxy    4096 15. Jul 2010  finance
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  forum
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  gamble
-rwxr-xr-x  1 proxy proxy   14894 15. Jul 2010  getlists.sh
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  hacking
drwxr-xr-x  5 proxy proxy    4096 15. Jul 2010  hobby
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  isp
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  jobsearch
drwxr-sr-x  2 proxy proxy    4096 15. Jul 2010  malware
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  movies
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  music
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  news
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  porn
drwxr-xr-x  6 proxy proxy    4096 15. Jul 2010  recreation
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  redirector
drwxr-xr-x  4 proxy proxy    4096 15. Jul 2010  science
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  shopping
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  spyware
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  tracker
-rwx------  1 proxy proxy   23271 15. Jul 2010  update-squidguard-blacklists
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  violence
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  warez
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  webmail
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  webradio
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  webtv
drwxr-sr-x  2 proxy proxy    4096 25. Mär 09:07 white
XDEB01:/var/lib/squidguard/db# cd adv/
XDEB01:/var/lib/squidguard/db/adv# ls -la
insgesamt 1192
drwxr-xr-x  2 proxy proxy   4096 15. Jul 2010  .
drwxrws--- 36 proxy proxy   4096 15. Jul 2010  ..
-rw-r--r--  1 proxy proxy 211445 13. Sep 21:22 domains
-rw-r--r--  1 proxy proxy 581632 13. Sep 21:22 domains.db
-rw-r--r--  1 proxy proxy 211445 13. Sep 21:22 domains.old
-rw-r--r--  1 proxy proxy  42447 13. Sep 21:22 urls
-rw-r--r--  1 proxy proxy  98304 13. Sep 21:22 urls.db
-rw-r--r--  1 proxy proxy  42447 13. Sep 21:22 urls.old
XDEB01:/var/lib/squidguard/db/adv#


Pls fix that and see if it's running.

Ove
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:fmarcelo14
Comment Utility
Permissions OK now, but de problem persist. How can I resolved this problem?

Problem:
[root@masrv044 ads]# tail -f /var/log/squidguard/squidGuard.log
2011-09-22 17:09:58 [12598] Added UserList source: rmfilho
2011-09-22 17:09:58 [12598] Added UserList source: fdeganutti
2011-09-22 17:09:58 [12598] Added UserList source: gcosta
2011-09-22 17:09:58 [12598] Added UserList source: mnbahena
2011-09-22 17:09:58 [12598] Added UserList source: lilian
2011-09-22 17:09:58 [12598] Added UserList source: fbertoni
2011-09-22 17:09:58 [12598] Added UserList source: validacao
2011-09-22 17:09:58 [12598] init domainlist /var/lib/squidguard/ads/domains
2011-09-22 17:09:58 [12598] /var/lib/squidguard/ads/domains: Permission denied
2011-09-22 17:09:58 [12598] going into emergency mode


Permission Directory:
[root@masrv044 squidguard]# ls -la
total 116
drwxr-xr-x+ 14 squid squid 4096 Sep  1 11:29 .
drwxr-xr-x  32 root  root  4096 Sep  1 09:24 ..
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 ads
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 adult
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 aggressive
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 audio-video
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 drugs
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 forums
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 gambling
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 hacking
lrwxrwxrwx   1 squid squid   17 Sep  1 11:29 local -> /etc/squid/local/
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 mail
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 proxy
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 violence
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 warez
[root@masrv044 squidguard]#

Permission File:
[root@masrv044 ads]# ls -la
total 96
drwxr-xr-x+  2 squid squid  4096 Sep  1 11:29 .
drwxr-xr-x+ 14 squid squid  4096 Sep  1 11:29 ..
-rw-r--r--+  1 squid squid  4623 Mar 31  2010 domains
-rw-r--r--+  1 squid squid 20480 Sep  2 06:33 domains.db
-rw-r--r--+  1 squid squid    68 Mar 31  2010 expressions
-rw-r--r--+  1 squid squid  4988 Mar 31  2010 urls
-rw-r--r--+  1 squid squid 20480 Sep  2 06:33 urls.db
[root@masrv044 ads]#


0
 
LVL 11

Expert Comment

by:Ove
Comment Utility
pls post your squidGuard.conf

Ove
0
 
LVL 11

Expert Comment

by:Ove
Comment Utility
and also /etc/squid.conf pls.

Ove
0
 

Author Comment

by:fmarcelo14
Comment Utility
0
 
LVL 13

Accepted Solution

by:
Sandy earned 500 total points
Comment Utility
sorry !!! but i prefer artica or dansguardian for this purpose
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now