LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-04-2007, 05:50 AM   #1
Dogar
Member
 
Registered: Feb 2007
Posts: 56

Rep: Reputation: 15
Blacklist Update


hi
i have install and configure squidguard

now the problem is that i want to update the blacklists

1)how can i update the blacklists
2)i want to remove a domain from the domain list like linuxquestions.org is present in my CHAT list i want to remove it from this list how can i do this


waiting for ur help

Bilal
 
Old 04-05-2007, 03:43 PM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
I setup a cron job to do a weekly download from urlblacklist.com, then I extract the tarball and rebuild all the indexes using the squidGuard command. I would suggest to read the O'Reilly Squid book. It really teaches you how to do manage squid in detail. The rest you will have to google.
 
Old 04-05-2007, 11:18 PM   #3
Dogar
Member
 
Registered: Feb 2007
Posts: 56

Original Poster
Rep: Reputation: 15
thanks ram

this help me and i update my data base

can u help in cron utility...
actuly i want i update my data base at midnight and i want to run "squidGuard -C all" command automaticaly


thnks again
 
Old 04-06-2007, 08:49 AM   #4
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
Below is my script. It works like a charm. It downloads the latest blacklist every weekend and automatically updates it. Squid is interrupted only for a couple of minutes. It's built for Debian so you may have to modify it if using something else. Save it to /root/scripts/blacklistupdate.sh then run 'crontab -e' as root to add it. Remember to restart cron. I have it running every Sunday night at 2AM or so.

################################
#!/bin/sh
#

cd /tmp

wget -Y on "http://urlblacklist.com/cgi-bin/commercialdownload.pl?type=download&file=bigblacklist" -O blacklist.tar.gz

tar -zxf blacklist.tar.gz

cd blacklists

rsync -a . /var/lib/squidguard/db/

/etc/init.d/squid stop

squidGuard -C all

chown -R proxy.proxy /var/lib/squidguard/db

/etc/init.d/squid start

rm -rf /tmp/blackl*

################################
 
1 members found this post helpful.
Old 04-13-2007, 12:20 AM   #5
Dogar
Member
 
Registered: Feb 2007
Posts: 56

Original Poster
Rep: Reputation: 15
hi ram

how r u.
thanks for your kind information.i understand your whole information above.
but i want to know what is code of your cron file.i want to clear my problem that is given bellow.

i write script with the file name "script" for my cron utility i make it executeable and it work manuly but when i use it in cron then no responce form it.This is my cron file.

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts


*/2 * * * * (/./script >> cronmessage.log)
#*/15 * * * * (/./pingo >> cronmessage.log)
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

this line of code
#*/15 * * * * (/./pingo >> cronmessage.log)
is my test line and it work properly.it mean that there is not problem in my cron file.
can you give me yor cron file please and guide me more in this reguard

thanks
 
Old 04-13-2007, 07:56 AM   #6
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
Move the script to the directory /etc/cron.daily and then it will get executed daily at 4:02AM.
 
Old 04-13-2007, 07:56 AM   #7
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
Better yet, move it to the directory /etc/cron.weekly. You don't need to update you lists every day but only every week. Make sure that cron trully is running in the background after you restart. I hope this helps.
 
Old 04-17-2007, 11:21 PM   #8
Dogar
Member
 
Registered: Feb 2007
Posts: 56

Original Poster
Rep: Reputation: 15
hi ram
how r u

as i told you in my last post that my "script" file is working manulay.but when i put it into my cron weakly or cron daily dorectories then it is not working.
is there any other method or some thing other to do.....


bilal
 
Old 04-18-2007, 08:08 AM   #9
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
Obviously, you where able to narrow down the problem to cron. Start doing some troubleshooting with cron.
 
  


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
Postfix blacklist crxssi Linux - Server 7 09-23-2009 02:34 PM
?Odd bug. modprobe.blacklist~ behaves as modprobe.blacklist arubin Slackware 1 11-05-2006 07:08 PM
spamassassin blacklist stomach Linux - Software 1 02-08-2006 04:37 PM
a blacklist for hal? evans0409 Linux - Software 12 02-05-2006 09:29 PM
what is /etc/hotplug/blacklist for? slinky2004 Linux - Software 1 09-10-2005 11:44 PM


All times are GMT -5. The time now is 03:08 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration