1. apt-get update
2. apt-get install squid
3. open squid.conf for configuration
vi /etc/squid3/squid.conf
change the below mentioned lines..
http_port 3128 transparent
cache_mem 64 MB
maximum_object_size 11000 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 64 KB
cache_dir ufs /usr/spool/squid3 50000 16 256 #(50000 = 50GB cache storage)
cache_access_log /var/log/squid3/access.log
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
visible_hostname proxy #(replace your proxy server name with proxy)
acl access_all src 192.168.1.0
http_access allow access_all
:wq #save file and exit
3. create cache folder
4. mkdir /usr/spool
5. mkdir /usr/spool/squid
6. change the permission of squid cache directory.
7. chown proxy:proxy /usr/spool/ -R
8. enable ipv4 packet forwording. go to /etc/sysctl.conf. uncomment the line no 26 #net.ipv4.ip_forward=1
9. reload the file
root# sysctl -p
now start the squid service
# /etc/init.d/squid start
check squid service process
# ps aux | grep squid
1. apt-get install squidGuard
2. copy blacklist.tgz in /opt folder
3. extract the blacklist folder # tar -xvf blacklist.tgz
4. go to blacklist directory.
5. copy blacklist subfolder in /var/lib/squidguard/db/ forlder.
6. cp -r * /var/lib/squidguard/db/
7. go to /var/lib/squidguard/db/ folder
8. chown proxy:proxy * -R
9. squidGuard -C all ### for create db files.
10. change ownership of the .db files.
chown proxy:proxy * -R
11. add 2 lines in squid.conf
url_rewrite_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
url_rewrite_children 10
save and exit.
12. restart the squid service
13. check the status of squidGuard.
# ps aux | grep squid
proxy 2019 0.1 0.8 41320 17580 ? Ss 11:19 0:00 /usr/sbin/squid -N -D
proxy 2063 0.6 0.2 13024 4432 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2064 0.6 0.2 13024 4436 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2065 0.6 0.2 13024 4436 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2066 0.6 0.2 13020 4428 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2067 0.6 0.2 13020 4436 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2068 0.6 0.2 13024 4436 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2069 0.6 0.2 13020 4428 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2070 0.6 0.2 13020 4428 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2071 0.3 0.2 13020 4428 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2072 0.3 0.2 13024 4432 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
root 2075 0.0 0.0 7624 928 pts/0 R+ 11:27 0:00 grep --color=auto squid
Note: first add category role in squidguard.conf then create .db file.
2. apt-get install squid
3. open squid.conf for configuration
vi /etc/squid3/squid.conf
change the below mentioned lines..
http_port 3128 transparent
cache_mem 64 MB
maximum_object_size 11000 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 64 KB
cache_dir ufs /usr/spool/squid3 50000 16 256 #(50000 = 50GB cache storage)
cache_access_log /var/log/squid3/access.log
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
visible_hostname proxy #(replace your proxy server name with proxy)
acl access_all src 192.168.1.0
http_access allow access_all
:wq #save file and exit
3. create cache folder
4. mkdir /usr/spool
5. mkdir /usr/spool/squid
6. change the permission of squid cache directory.
7. chown proxy:proxy /usr/spool/ -R
8. enable ipv4 packet forwording. go to /etc/sysctl.conf. uncomment the line no 26 #net.ipv4.ip_forward=1
9. reload the file
root# sysctl -p
now start the squid service
# /etc/init.d/squid start
check squid service process
# ps aux | grep squid
1. apt-get install squidGuard
2. copy blacklist.tgz in /opt folder
3. extract the blacklist folder # tar -xvf blacklist.tgz
4. go to blacklist directory.
5. copy blacklist subfolder in /var/lib/squidguard/db/ forlder.
6. cp -r * /var/lib/squidguard/db/
7. go to /var/lib/squidguard/db/ folder
8. chown proxy:proxy * -R
9. squidGuard -C all ### for create db files.
10. change ownership of the .db files.
chown proxy:proxy * -R
11. add 2 lines in squid.conf
url_rewrite_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
url_rewrite_children 10
save and exit.
12. restart the squid service
13. check the status of squidGuard.
# ps aux | grep squid
proxy 2019 0.1 0.8 41320 17580 ? Ss 11:19 0:00 /usr/sbin/squid -N -D
proxy 2063 0.6 0.2 13024 4432 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2064 0.6 0.2 13024 4436 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2065 0.6 0.2 13024 4436 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2066 0.6 0.2 13020 4428 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2067 0.6 0.2 13020 4436 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2068 0.6 0.2 13024 4436 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2069 0.6 0.2 13020 4428 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2070 0.6 0.2 13020 4428 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2071 0.3 0.2 13020 4428 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 2072 0.3 0.2 13024 4432 ? Ss 11:27 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
root 2075 0.0 0.0 7624 928 pts/0 R+ 11:27 0:00 grep --color=auto squid
Note: first add category role in squidguard.conf then create .db file.

No comments:
Post a Comment