Posted by: kezhong | June 8, 2011

Install Squid Proxy Server on CentOS 5.6

We ordered a vps server(CentOS 5.6) in US, and wanted it as a proxy server. The following is the steps.

Install Squid
# yum install squid

Edit the /etc/squid/squid.conf file
Add “acl authorizedip src xxx.xxx.xxx.xxx” line in ACCESS CONTROL tag (xxx.xxx.xxx.xxx use your IP)
Add “http_access allow authorizedip” line before “http_access deny all” in http_access tag

Start the service
# chkconfig squid on
# service squid start

Verify the port 3128 is open
[root@vps1 ~]# netstat -tulpn | grep 3128
tcp 0  0 0.0.0.0:3128  0.0.0.0:*  LISTEN  25653/(squid)

Configure firewall
Edit the /etc/sysconfig/iptables file, and add the following two lines in appropriate place
-A INPUT -m state –state NEW,ESTABLISHED -p tcp –dport 3128 -j ACCEPT
-A OUTPUT -m state –state ESTABLISHED -p tcp –sport 3128 -j ACCEPT
# service iptables restart

Reference
Install Squid Proxy Server on CentOS / Redhat enterprise Linux 5


Leave a Reply

Fill in your details below or click an icon to log in:

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

Categories

%d bloggers like this: