LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-15-2006, 02:49 PM   #1
slacky
Member
 
Registered: Feb 2004
Location: USA
Distribution: Debian
Posts: 174

Rep: Reputation: 16
Squidguard:


Hello,

Is there a way to configure Squidguard to redirect users to different sites depending on which blacklist they hit? For example, I have two blacklists - "blocked_auto" is a list of 1000s of banner ad and spyware sites obtained from a web site, "blocked_malware" is a smaller list of sites I manually add to. For "blocked_auto" I just want to redirect to a Intranet web page that says "Access to this site was denied by the sysadmin", but for "blocked_malware" I want to redirect to a different Intranet web page that runs a php script to log the access.

Thanks,
slacky

Here is a simplied version of my squidGuard.conf (my real one has a bit more rules).

Code:
dest blocked_malware {
        domainlist blocked_malware
}

dest blocked_auto {
        domainlist blocked_auto
}

acl {
        ip_admins {
                pass !blocked_malware !blocked_auto all
        }

        allowed_users {
                pass !blocked_malware !blocked_auto all
        }

        default {
                pass always_allowed none
                redirect http://www.intranet.local/noaccess.html
        }
}
 
Old 05-15-2006, 04:53 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
I googled and saw this setup (#7 -- not sure if you need the 302:http:.....)
Quote:
Originally Posted by slacky
Code:
dest blocked_malware {
        domainlist blocked_malware
        redirect    http://info.foo.bar/images/blocked.gif   # redirect matches to this URL
}

dest blocked_auto {
        domainlist blocked_auto
        redirect    http://info.foo.bar/images/blocked_again.gif   # redirect matches to this other URL
}

acl {
        ip_admins {
                pass !blocked_malware !blocked_auto all
        }

        allowed_users {
                pass !blocked_malware !blocked_auto all
        }

        default {
                pass always_allowed none
                redirect http://www.intranet.local/noaccess.html
        }
}

Last edited by pljvaldez; 05-15-2006 at 04:55 PM.
 
Old 05-16-2006, 08:17 AM   #3
slacky
Member
 
Registered: Feb 2004
Location: USA
Distribution: Debian
Posts: 174

Original Poster
Rep: Reputation: 16
Thank you very much - that works perfectly.

slacky
 
  


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
error: mail command failed for /var/log/squidguard/squidGuard.log.6 Niceman2005 Linux - Networking 1 01-22-2009 02:24 PM
Squidguard sanjibgupta Linux - Security 1 09-26-2005 02:47 AM
squidguard metallica1973 Linux - Security 5 05-24-2005 10:24 AM
squidGuard hariiyer Linux - Networking 4 12-21-2004 03:29 AM
squidguard ? maxut Fedora 1 05-10-2004 05:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:41 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
Open Source Consulting | Domain Registration