Thursday, January 28, 2016

Squid Proxy Server configure



Squid Proxy Server configure in rhel6/centos6


                                                     Squid
                                         **************************
Packages- squid
Port No-  3128
daemon-  squid
script-  /etc/init.d/squid
conf file- /etc/squid/squid.conf

[root@station19 Desktop]# yum install squid* -y
oaded plugins: refresh-packagekit, rhnplugin Running Transaction 

Installing     : 7:squid-3.1.4-1.el6.x86_64                               1/1
Installed:          squid.x86_64 7:3.1.4-1.el6                                                   

Complete!
2-> Now configur conf file-->>
****************************


[root@station19 Desktop]# vim /etc/squid/squid.conf


#To block a particular Network:
acl my_net src 192.168.0.0/24 192.168.1.0/24
http_access allow my_net

#To block a particular ip:

acl bad_ip src 192.168.0.21
acl bad_ip src 192.168.0.22
http_access deny bad_ip

#To block a particular URL:

acl bad_site dst www.yahoo.com
http_access deny bad_site

#To block only one domain:

acl block_orkut dstdomain .orkut.com
http_access deny block_orkut

#To block a list of sites from / specified in a file:
acl block_list url_regex "/etc/squid/block_list.txt"
http_access deny block_list

#Blocking web access by time:
#acl aclname time [day-abbrevs] [h1:m1-h2:m2]
#h1:m1 must be less than h2:m2
#Day-abbrevs:
#S - Sunday,M - Monday,T – Tuesday,W - Wednesday,H - Thursday,F - Friday,A - Saturday

acl mynetwork src 192.168.0.0/255.255.255.0
acl Break time MTWHFA 02:32-03:00
http_access deny mynetwork Break


#To block the URLs contains the word "word":
acl block_word_url url_regex sex
http_access deny block_word_url

#To prevent downloading files:
acl block_exe url_regex .*\.exe$
http_access deny block_exe

#To block access to some TLDs:
acl block_tld dstdom_regex \.uk$
http_access deny block_tld

3-> Now create block file and service restart

[root@station19 Desktop]# cat >/etc/squid/block_list.txt
www.hotmail.com
www.ibm.com
www.hp.com


[root@station19 Desktop]# /etc/init.d/squid restart
Stopping squid:                                            [FAILED]
Starting squid: .                                          [  OK  ]

 

[root@station19 Desktop]# chkconfig squid on

                                                         now configure client 
                if you want to more knowlage about squid send me your query
                                    

MAXIT INTERNET

BLOGGER

CD DVD RW

DELL

DOWNLOAD

FTP Server Linux

HACK

HARD DRIVE

HOW TO WORKIN

HARDWAER

INTERNET

INTERNET CAFE

LAPTOP

LENOVO

LINUX

Additional configuration for Samba Server (Part 2)  

BSNL/Airtel/Idea using Huawei E156G 3g Wireless USB Linux 5   

Basic File Extensions    CHANGING AN ACCOUNT EXPIRATION DATE   

Configure Linux as a Router   

Configure SAMBA Server (Part-1)   

Configure VNC server   

Configure Yum Server (Part-1)   

Configure yum server for Client machine (Part 3)   

Configuring Samba as a Standalone Server (Part 3)  

Connecting ftp Server with Anonymous User Part 5  

Create ftp account with Shared directory Part 3  

DHCP Server Configuration Part 2  

DHCP Server Configuration Part-1  

DHCP Server Configuration Part-3  

Enabling FTP Services in Yum Server (Part 5)  

FTP Server Configuration Part 1  

FTP Server How to Change In Primary DNS Server Part 2  

HTTP Client side configuration (Part 4)  

How to Vsftpd conf files Parameter Part 6   

LINUX FILE SYSTEM STRUCTURE  

Linux User Administrtion  

Linux as a Router configuration for Client Machine   

Linux client machine FileZilla FTP Client Part 4  

Local Yum Server (Part 2)  

Modifying Existing User Information  

Primary DNS Server Configuration Part-1  

Primary DNS Server Configuration Part-2    

Primary DNS Server Configuration Part-3  

Remove Linux From Your Pc Safely and restoring your MBR  

Sharing & Accessing Samba Share (Part 4)   

Speeding up your internet connection under Linux and Windows   

THE ROOT FILE SYSTEM   

VNC Server Configuration

LINUX LAB

Linux as a Router

MOTHERBOARD

Mobile

NETWORKING

REDHAT 5

REGISTRY EDTOR

RESET BIOS PASSWORD

SAMBA Server Linux

SERVER

SERVER CONFIG

SOFTWAER

VNC server Linux

Window 10

Window XP