You are on page 1of 7

INSTALLATION DOCUMENT

Installed OS : Red hat Enterprise 4 ES 

Installed Service :  
•Proxy (Squid) 
•URL and Virus Filter 
     (Danguardian­antivirus with BIGBLACKLIST)
•Virus Database (Clam AV)
•Web Access Report (SARG) 
•Web Server for Change Password
    
 1.Proxy : 
  

Here we have configured Proxy for the following features: 

1.Username And Password Authentication
2.Bandwidth Allocation based on user groups
3.Time based BW Allocation with User groups

Installed Package: 

Squid Version (squid­2.5.STABLE6­3) 

Configuration Directory: /etc/squid

Configuration File: squid.conf

Main Modified Configuration Parameters: 

1. Visible_hostname wifiproxy (Proxy Hostname Information) 
2. Http_port 127.0.0.1:3128 (Enabling Proxy to Listen on Localhost) 
3. Cache_mem 1500 MB (Allocation RAM Size to work with cache)
4. Cache_dir ufs /var/spool/squid 10000 16 256 (Allocating Harddisk Size and Directory 
to holding Cache) 
5. Auth_param basic program /usr/lib/squid/ncsa_auth /var/www/html/password 
(Configuring Proxy to user authentication tool as ncsa_auth and user and password 
lookup file) 

######ACL for Authenticating User Groups#############
acl students proxy_auth "/etc/squid/students"
acl staffs proxy_auth "/etc/squid/staffs"
http_access allow students
http_access allow staffs

########ACL for Time Settings########################
acl daytime time MTWHF 08:30­17:00

########Setting Bandwidth Control####################
delay_pools 4
delay_class 1 1
delay_class 2 1
delay_class 3 1
delay_class 4 1
delay_parameters 1 524288/524288    #########Allowing 4 Mbps
delay_parameters 2 786432/786432    #########Allowing 6 Mbps
delay_parameters 4 262144/262144    ########Allowing 2 Mbps
delay_parameters 3 1048576/1048576  #########Allowing 8 Mbps

###Specifying Bandwidth rights for Students on daytime
delay_access 1 allow daytime
delay_access 1 deny !daytime
delay_access 1 allow students

###Specifying Bandwidth rights for Staffs on daytime
delay_access 2 allow daytime
delay_access 2 deny !daytime
delay_access 2 allow staffs

###Specifying Bandwidth rights for Students on evening and Holidays
delay_access 3 allow !daytime
delay_access 3 deny daytime
delay_access 3 allow students
###Specifying Bandwidth rights for Staffs on evening and Holidays
delay_access 4 allow !daytime
delay_access 4 deny daytime
delay_access 4 allow staffs

2. URL and VIRUS Filter

Dansguardian is installed and configured for URL and Virus Filtering

Dansguardian Package: 

dansguardian­antivirus­6.4.4.2­1

Configuration Directory: /etc/dansguardian
Configuration File (Main): dansguardian.conf

Main Configured Parameters: 

logfileformat = 3  (SQUID Log File Format)

filterip = 172.16.30.130 (Dansguardian Listening IP) 

# the port that DansGuardian listens to.
filterport = 8080 
# the ip of the proxy (default is the loopback ­ i.e. this server)
proxyip = 127.0.0.1
# the port DansGuardian connects to proxy on
proxyport = 3128

# sets the maximum number of processes to sporn to handle the incomming
# connections.  Max value usually 250 depending on OS.
# On large sites you might want to try 180.
maxchildren = 250

# sets the minimum number of processes to sporn to handle the incomming connections.
# On large sites you might want to try 32.
minchildren = 32

# sets the minimum number of processes to be kept ready to handle connections.
# On large sites you might want to try 8.
minsparechildren = 8

# sets the minimum number of processes to sporn when it runs out
# On large sites you might want to try 10.
preforkchildren = 10

# sets the maximum number of processes to have doing nothing.
# When this many are spare it will cull some of them.
# On large sites you might want to try 64.
maxsparechildren = 64

# sets the maximum age of a child process before it croaks it.
# This is the number of connections they handle before exiting.
# On large sites you might want to try 10000.
maxagechildren = 10000

virusscan = on (Enabling Virus Scan) 

virusengine = 'clamdscan' (Specifying Dansguardian to Use Clamav Database) 

# OPTION: emaildomain
# Set email domain to use when notifying users of an infected file.
# This is just the domain name part, after the @
emaildomain = 'sastra.edu'

# OPTION: postmaster
# Set email address of who to notify about any infections found.
# should put your full domain name here too.
postmaster = 'armstrong@sastra.edu'

# OPTION: emailserver
# Set the address and port of the Mail Server to send notifications through.
#
emailserver = '192.168.10.12:25'
clamdsocket = '127.0.0.1:3310'

Some Important Config Files in Dansguardian 

bannedextensionlist   (Here You can add extension name to block website and downloads) 
bannedmimetypelist  (Here you can specify application oriented blocking) 
bannediplist (Here you can specify from what are the Ips that we have block the internet 
access) 
bannedregexplist (Here You can Specify what are the headers string to be blocked) 
bannedsitelist ( Here you can specify What are the sites to be blocked) 
bannedurllist (Here you can specify what are the URLS to be blocked) 
exceptioniplist , exceptionsitelist, exceptionuserlist (Vice Versa Management) 

Note: 

We can download bigblacklist from urlblacklist.com

We can extract the bigblacklist on /etc/dansguardian directory

We can include those blacklist files on bannedsitelist and bannedurllist.

3. Virus Database: 

Clam AV is installed. Installed Package Version clamav­0.88.1­1 
by using freshclam command to update virus database. (It will automatically download 
the virus database on daily basis) 

4. Web Access Report: 

Squid Analyzer and Report Generator (SARG) is installed and configured.  

Installed Package: 

Sarg­2.2.3.1­1.el4.rf
Configuration directory: /etc/sarg

Configuration file: sarg.conf

Main Parameter: 
access_log /var/log/dansguardian/access.log

User Creation on Squid

Password File: /var/www/html/password

Adding the Users: 

htpasswd ­b /var/www/html/password user1 userpw

Changing Password for Users: 

htpasswd ­b /var/www/html/password user1 userpw 

Adding the Users on Students group 

echo user1 >> /etc/squid/students

Adding the Users on Staff Group 

echo user1 >> /etc/squid/staffs

Changing The Password by using Web Interface: 
Access:  http://172.16.1.4
 
Creating the Users by using Admin Password
 
Access: http://172.16.1.4

Username :  New Username
Old Password :  Admin Password  (unity123) 
New Password : New User Password 
Confirm New Password : Confirm the New User Password
 

Administration of Proxy: 

If you want to block some website: add the site name in /etc/dansguardian/bannedistelist

for allowing vice versa in exceptionsitelist

Now Proxy is configured following logrotating statement

Keep 4 week Logs , The Existing Week log should be compressed. 

Trouble Shooting Proxy:

Some Time User Can get following error: 

Connect with Clamdscan failed. 

Then you have to give the following command in proxy

service clamd restart

You might also like