SquidGuard is a URL redirector and content filter addon that restricts proxy clients from accessing particular and/or banned site(s), IP addresses, URLs, website patterns using the proxy server. SquidGuard can be used in conjunction with Squid proxy to implement website content filter from the proxy server.
Here's a run down on how to install and integrate SquidGuard into Squid-based proxy server.
Fedora 9: SquidGuard Installation
Requirements:
1. Existing Fedora 9 box
2. Existing Squid Configuration
Proceed with SquidGuard installation via yum.
As root, issue
# yum -y install squidGuard
By default rpm installation, squidGuard configuration files are installed to /etc/squid/squidGuard.conf while blacklist squidGuard files are located to /var/squidGuard/blacklists
SquidGuard Integration to Squid Proxy Server
Backup and modity /etc/squid/squid.conf. Insert the below lines into /etc/squid/squid.conf
redirect_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
url_rewrite_children 400
This above tells squid to do URL fetch redirection using squidGuard binary and at the same time, spawn 400 squidGuard children or copies. Modify the values to suit your need. Remember that the value is a trade off thing based from your needs and what resources you have.
SquidGuard Configuration Setup
Create a backup copy of /etc/squid/squidGuard.conf . Modify /etc/squid/squidGuard.conf.
a. SquidGuard Log files and black listed sites, URLs and IPs
dbhome /var/squidGuard/blacklists
logdir /var/log/squid
No need to modify the above default values unless you change them to your needs.
b. Time-Based Access Control
If you wish to implement time-based access control, below is a sample format
time workhours {
weekly mtwhf 08:00 - 23:30
date *-*-01 08:00 - 23:30
}
time special-hours {
weekly mwf 08:00 - 11:00
}
c. Source Access Control
If you wish to implement access control based on IP addresses and/or network IP block, shown below are sample formats
src foo-clients {
ip 192.168.1.4-192.168.1.254
}
src lan-clients {
ip 10.10.100.0/26
}
src admin {
ip 83.83.83.83 83.83.83.100
}
d. Destination Access Control
This is where you can specify the blacklist file(s). Blacklist files contains all banned URLs, websites and web IP addresses.
dest adultsites {
urllist blacklists/porn/urls
}
dest hacksites {
urllist blacklists/hacking/urls
}
d. Access Control Policy
Here is where the action begins. All the above control access list could be taken down below with most likely the same format to allow and deny access.
acl {
foo-clients {
pass !adultsites all
redirect 302:http://www.mydomain.com/banned
}
vlan-clients within workhours {
pass !hacksites all
redirect 302:http://www.foo.com/banned.html
}
lan-clients within special-hours {
pass good !in-addr !adult any
} else {
pass any
}
admins {
pass any
}
default {
pass local none
}
}
Starting Squid with SquidGuard
# service squid restart
Testing SquidGuard on Debug Mode
# echo "www.playboy.com - - GET" | squidGuard -c /etc/squid/squidGuard.conf -d
Replace URL playboy.com with your banned URL sites.
Checking SquidGuard Process and PIDs
# ps axuw | grep squidGuard
Loading SquidGuard with Alternate Config File
# squidGuard -d /etc/squid/newsquidGuard.conf
SquidGuard when integrated with Squid makes it a good content filter and URL redirector squid proxy addon.
You can visit SquidGuard for more info.
Subscription
Categories
- HowTos (612)
- Linux Devices (40)
- Linux Diggs (620)
- Linux News (1541)
- Linux Videos (24)
Recent Posts
Blog Archive
-
▼
2008
(2301)
-
▼
July
(297)
- How To Kill Application Process ID (PID) The Faste...
- How To Install Fedora 9 From The Internet
- How To Install PHP5 and Apache HTTP Server
- How To Display The Number of Processors in Linux
- How To Prevent Alt+F1 and Alt+F2 TTY Console Login...
- How To Install Text-based File Manager
- How To Delete Linux Files Older Than 360 days
- How To Install VirtualBox on Fedora 9
- HowTo: Delete All Thumbs.db Recursively
- HowTo: Delete All Thumbs.db Recursively
- 10 Cool Open Source Easter Eggs
- KDE 4.1 rocks the desktop
- 10 Cool Open Source Easter Eggs
- KDE 4.1 rocks the desktop
- Roku's Netflix Player: a hands-on review
- PostPath cracked Exchange protocols for Postfix-ba...
- Yahoo, HP, Intel Give Ivory Towers a Stairway to t...
- Portugal Rings Up Big Order for Intel's Classmate PCs
- SSD vs. SATA RAID: A Performance Benchmark
- Roku's Netflix Player: a hands-on review
- PostPath cracked Exchange protocols for Postfix-ba...
- Yahoo, HP, Intel Give Ivory Towers a Stairway to t...
- Portugal Rings Up Big Order for Intel's Classmate PCs
- Floating Point Math in Bash
- SSD vs. SATA RAID: A Performance Benchmark
- How To Mount Remote Folder Location Via SSHFS
- How To Protect SSH From Multiple and Parallel Coor...
- How To Enable IP Forwarding in Linux
- spell check text file from terminal
- spell check text file from terminal
- How To Allow and Deny SSH Access To Specific Users
- Customer demand adds Linux to industrial computer ...
- Is OpenSolaris in hot water?
- Anatomy of the Linux file system
- Linux development on the PS 3 More than a toy - pa...
- Quotes from Bill Gates, Steve Jobs and Linus Torvalds
- Under Pressure, ISP Admits Secret Web Snooping in ...
- Open Web Foundation to Play Freedom Cop for Net Specs
- Customer demand adds Linux to industrial computer ...
- Is OpenSolaris in hot water?
- Anatomy of the Linux file system
- Linux development on the PS 3 More than a toy - pa...
- Quotes from Bill Gates, Steve Jobs and Linus Torvalds
- Installing Applications on Linux
- Under Pressure, ISP Admits Secret Web Snooping in ...
- Open Web Foundation to Play Freedom Cop for Net Specs
- Microsoft Becomes Just a Little More Like Apple
- Tux3, a Versioning Filesystem
- Anatomy of Linux loadable kernel modules
- Shuttleworth: Microsoft Does Not Want War
- The Open Call
- Google Gadgets for Linux -- Almost There
- Cloud Computing: When Computers Really Do Rule
- Consoles Sell Like Hotcakes, Yahoo Cuts a Deal, Sy...
- Microsoft Becomes Just a Little More Like Apple
- Tux3, a Versioning Filesystem
- Anatomy of Linux loadable kernel modules
- Shuttleworth: Microsoft Does Not Want War
- The Open Call
- Google Gadgets for Linux -- Almost There
- Cloud Computing: When Computers Really Do Rule
- Consoles Sell Like Hotcakes, Yahoo Cuts a Deal, Sy...
- How To Install Adobe Flash Player 10 in Fedora
- How To Add and Install Alternative Liberation Fonts
- Digg it: Top 1 Supercomputer is powered by Fedora
- How To Send System Message To FTP Clients via TCP ...
- Intel Switches From Ubuntu To Fedora For Mobile Linux
- Intel Switches From Ubuntu To Fedora For Mobile Linux
- How To Create Separate SSH Log File for Specific S...
- How To Allow and Deny SSH Access To Selected Hosts...
- Fedora 10 - Friends, Freedom, Features, and First
- Fedora 10 - Friends, Freedom, Features, and First
- The Mess That is Linux Volume Management
- Are We About to Witness a Real OS X virus?
- Security is No Secret
- Enterprise Storage Solution Using Nand Flash and ZFS
- Shuttleworth Sets Bar For Linux 'Beyond Apple'
- Why We Still Need the iPhone App Black Market
- DragonFly BSD 2.0 Released
- Interview with Mandriva's KDE Developer Helio Castro
- Mandriva and PTech Announce Low-cost Desktop
- The Coco Bidet and Toilet Technology
- The Mess That is Linux Volume Management
- Are We About to Witness a Real OS X virus?
- Security is No Secret
- Enterprise Storage Solution Using Nand Flash and ZFS
- Shuttleworth Sets Bar For Linux 'Beyond Apple'
- Why We Still Need the iPhone App Black Market
- DragonFly BSD 2.0 Released
- Interview with Mandriva's KDE Developer Helio Castro
- Mandriva and PTech Announce Low-cost Desktop
- The Coco Bidet and Toilet Technology
- Automatix Comes to Fedora 9 - FedoMATIX
- Automatix Comes to Fedora 9 - FedoMATIX
- #1 Supercomputer in the World Runs Fedora
- #1 Supercomputer in the World Runs Fedora
- How To Install An Extremely Fast, Lightweight, But...
- How To Bypass DNS Log Monitoring By Your ISP
- Veteran developer ditches Microsoft for open source
- Why not learn a little language while you work, Am...
-
▼
July
(297)
Saturday, July 5, 2008
Fedora 9: SquidGuard Proxy Filter Install and HowTo

Subscribe to:
Post Comments (Atom)
ILoveTux - howtos and news | About | Contact | TOS | Policy
0 comments:
Post a Comment