Setting Up An Elite Proxy Using Squid 2.6 on cent os

update the system

Code:
sudo yum update

install squid

Code:
sudo yum install squid

this should install the squid . in my case it was squid 2.6

now we need to configure squid . if you use default settings and start the squid it will probably work but it wont act as an elite one
it will reveal itself as a proxy to the remote server.

so we need to change the configuration in squid.conf . on most machine squid configuration is located at /etc/squid/squid.conf we need to edit this file ,
but first we will backup the original squid.conf

Code:
sudo mv /etc/squid/squid.conf /etc/squid/squid.conf.bak

and now we will create a new configuration file with minimal directives .

will use nano as text editor , if you prefer vi you can use it to. if nano is not installed try

Code:
sudo yum install nano

ok now lets create a new configuration file

Code:
sudo nano /etc/squid/squid.conf

nano will open with a blank screen, type this directives there ,

Code:
http_port 1250
visible_hostname my.secure.isp
cache_effective_user squid squid
acl all src 0.0.0.0/0.0.0.0
acl localnet src 192.168.1.0/255.255.255.0
http_access allow all
header_access Via deny all
forwarded-for delete
header_access Forwarded-For deny all
header_access X-Forwarded-For deny all

and press ctrl + x then press y as it will ask to save it or not.

lets take a look those settings ,
http_port 1250 its the port number of your proxy server change it if you want something different by default its 3128

visible_hostname my.secure.isp this will appear as host name of the proxy server, in this case its my.secure.isp change it if you want .

to make squid start at boot
try

Code:
chkconfig squid on

now lets start squid if everything is ok
it will start fine

Code:
/etc/init.d/squid start

so your proxy address will be serverip:port . if my server ip is 127.0.0.1 and if use the port 1250 then it will be 127.0.0.1:1250

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s