LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-18-2014, 05:45 AM   #1
tripialos
Member
 
Registered: Apr 2012
Posts: 163

Rep: Reputation: Disabled
custom squidguard blacklists


Greetings

I am trying to create my own custom squidguard lists and so far i have no success. As far as i understood, you create the blacklists by using a text file, say urls, which contains all urls to block and by executing the command "squidGuard -C urls" you then create/convert the text file to a database file. Hence when completed you have two files:

urls and urls.db

My problem is that when i try to create my own lists, the db files are not created. For example, i downloaded a porn blacklist and when executed the command to convert the text file to a db it all went well.

I then created a text file called url with a single entry (microsoft.com), executed the command to make the db file but ..... no db file.

have checked permissions and seem to be ok.

here is also some terminal output

Code:
root@server:/var/lib/squidguard/db$ ll
total 68
drwxr-sr-x 17 proxy proxy 4096 Feb 18 14:17 ./
drwxr-xr-x  4 root  root  4096 May  9  2013 ../
drwxr-xr-x  2 proxy proxy 4096 May  9  2013 ads/
drwxr-xr-x  2 proxy proxy 4096 May  9  2013 aggressive/
drwxr-xr-x  2 proxy proxy 4096 May  9  2013 audio-video/
drwxr-sr-x  2 proxy proxy 4096 Feb 18 14:11 customlist/
drwxr-xr-x  2 proxy proxy 4096 May  9  2013 drugs/
drwxr-xr-x  2 proxy proxy 4096 May  9  2013 gambling/
drwxr-xr-x  2 proxy proxy 4096 Feb 18 14:14 hacking/
drwxr-xr-x  2 proxy proxy 4096 May  9  2013 mail/
drwxr-xr-x  2 proxy proxy 4096 Feb 18 14:12 porn/
drwxr-xr-x  2 proxy proxy 4096 Feb 18 14:19 proxy/
drwxr-xr-x  2 proxy proxy 4096 Feb 18 14:19 redirector/
drwxr-xr-x  2 proxy proxy 4096 Feb 18 14:19 spyware/
drwxr-xr-x  2 proxy proxy 4096 Feb 18 14:19 suspect/
drwxr-xr-x  2 proxy proxy 4096 Feb 18 14:19 violence/
drwxr-xr-x  2 proxy proxy 4096 Feb 18 14:23 warez/

root@server:/var/lib/squidguard/db$ ls warez/
domains  domains.db  urls  urls.db

root@server:/var/lib/squidguard/db$ ls customlist/
domains  urls

root@server:/var/lib/squidguard/db$ squidGuard -C customlist/urls 
root@server:/var/lib/squidguard/db$ squidGuard -C customlist/domains 

root@server:/var/lib/squidguard/db$ ls customlist/
domains  urls

root@server:/var/lib/squidguard/db$ ll customlist/
total 16
drwxr-sr-x  2 proxy proxy 4096 Feb 18 14:11 ./
drwxr-sr-x 17 proxy proxy 4096 Feb 18 14:17 ../
-rwxr-xr-x  1 proxy proxy   13 Feb 18 14:11 domains*
-rwxr-xr-x  1 proxy proxy   14 Feb 18 14:11 urls*

root@server:/var/lib/squidguard/db$

Also i noticed that despite the fact i specify which file to use in order to create a list, squidguard uses all available files under the db folder.


Quote:
2014-02-18 14:47:56 [13707] init domainlist /var/lib/squidguard/db/porn/domains
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/porn/domains.db
2014-02-18 14:47:56 [13707] init urllist /var/lib/squidguard/db/porn/urls
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/porn/urls.db
2014-02-18 14:47:56 [13707] init domainlist /var/lib/squidguard/db/ads/domains
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/ads/domains.db
2014-02-18 14:47:56 [13707] init urllist /var/lib/squidguard/db/ads/urls
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/ads/urls.db
2014-02-18 14:47:56 [13707] init domainlist /var/lib/squidguard/db/aggressive/domains
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/aggressive/domains.db
2014-02-18 14:47:56 [13707] init urllist /var/lib/squidguard/db/aggressive/urls
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/aggressive/urls.db
2014-02-18 14:47:56 [13707] init domainlist /var/lib/squidguard/db/drugs/domains
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/drugs/domains.db
2014-02-18 14:47:56 [13707] init urllist /var/lib/squidguard/db/drugs/urls
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/drugs/urls.db
2014-02-18 14:47:56 [13707] init domainlist /var/lib/squidguard/db/hacking/domains
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/hacking/domains.db
2014-02-18 14:47:56 [13707] init urllist /var/lib/squidguard/db/hacking/urls
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/hacking/urls.db
2014-02-18 14:47:56 [13707] init domainlist /var/lib/squidguard/db/proxy/domains
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/proxy/domains.db
2014-02-18 14:47:56 [13707] init urllist /var/lib/squidguard/db/proxy/urls
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/proxy/urls.db
2014-02-18 14:47:56 [13707] init domainlist /var/lib/squidguard/db/redirector/domains
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/redirector/domains.db
2014-02-18 14:47:56 [13707] init urllist /var/lib/squidguard/db/redirector/urls
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/redirector/urls.db
2014-02-18 14:47:56 [13707] init domainlist /var/lib/squidguard/db/spyware/domains
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/spyware/domains.db
2014-02-18 14:47:56 [13707] init urllist /var/lib/squidguard/db/spyware/urls
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/spyware/urls.db
2014-02-18 14:47:56 [13707] init domainlist /var/lib/squidguard/db/suspect/domains
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/suspect/domains.db
2014-02-18 14:47:56 [13707] init urllist /var/lib/squidguard/db/suspect/urls
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/suspect/urls.db
2014-02-18 14:47:56 [13707] init domainlist /var/lib/squidguard/db/violence/domains
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/violence/domains.db
2014-02-18 14:47:56 [13707] init urllist /var/lib/squidguard/db/violence/urls
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/violence/urls.db
2014-02-18 14:47:56 [13707] init domainlist /var/lib/squidguard/db/warez/domains
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/warez/domains.db
2014-02-18 14:47:56 [13707] init urllist /var/lib/squidguard/db/warez/urls
2014-02-18 14:47:56 [13707] loading dbfile /var/lib/squidguard/db/warez/urls.db
2014-02-18 14:47:56 [13707] destblock good missing active content, set inactive
2014-02-18 14:47:56 [13707] destblock local missing active content, set inactive
2014-02-18 14:47:56 [13707] squidGuard 1.2.0 started (1392720476.149)
2014-02-18 14:47:56 [13707] db update done
2014-02-18 14:47:56 [13707] squidGuard stopped (1392720476.156)

Any squidguard guru around that knows the trick?


thanks

Last edited by tripialos; 02-18-2014 at 05:50 AM.
 
Old 02-18-2014, 06:37 AM   #2
tripialos
Member
 
Registered: Apr 2012
Posts: 163

Original Poster
Rep: Reputation: Disabled
GOT IT!!!

from the documentation of squidguard:

Quote:
Only those files are converted you specified to block or whitelist in your squidGuard.conf file.
The reason why dbs files were not created was, as stated above, because i haven't actually "used" the list in my config files, hence, if have a list which is not used/declared on the config file the squidGuard command will not convert the list to .db file
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SquidGuard: include some config file in squidGuard.conf toure32 Linux - Server 1 04-12-2011 03:10 PM
error: mail command failed for /var/log/squidguard/squidGuard.log.6 Niceman2005 Linux - Networking 1 01-22-2009 02:24 PM
Blacklists refusing to block with squidGuard-1.2.1 with Fedora Core 5 A Simple Noob Linux - Server 1 10-22-2007 01:45 AM
Good SquidGuard Blacklists? rignes Linux - Networking 4 08-15-2006 12:18 PM
squidguard blacklists dansguardian script paul_mat Linux - Networking 1 07-13-2006 09:48 PM


All times are GMT -5. The time now is 08:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration