How To Install Squid Proxy on CentOS

  • Log into the server using Putty or SecureCRT
  • Run the following commands -
    • yum -y install squid
    • chkconfig squid on
  • Next setup access restrictions to prevent anyone from using the squid proxy
    • Using pico or vi edit the following file and add your IP address.  You can obtain your IP address by visiting www.ipchicken.com
      • /etc/squid/squid.conf
      • Add the following code where replace the IP with your IP address -
        • acl localnet src 123.456.56.896
  • By default squid runs on port 3128 but if you wish to change the port, please edit the file /etc/squid/squid.confTo prevent your server from being detected as a proxy, setup the following in /etc/squid/squid.conf
    • http_port 3128
via off
forwarded_for off

request_header_access Allow allow all 
request_header_access Authorization allow all 
request_header_access WWW-Authenticate allow all 
request_header_access Proxy-Authorization allow all 
request_header_access Proxy-Authenticate allow all 
request_header_access Cache-Control allow all 
request_header_access Content-Encoding allow all 
request_header_access Content-Length allow all 
request_header_access Content-Type allow all 
request_header_access Date allow all 
request_header_access Expires allow all 
request_header_access Host allow all 
request_header_access If-Modified-Since allow all 
request_header_access Last-Modified allow all 
request_header_access Location allow all 
request_header_access Pragma allow all 
request_header_access Accept allow all 
request_header_access Accept-Charset allow all 
request_header_access Accept-Encoding allow all 
request_header_access Accept-Language allow all 
request_header_access Content-Language allow all 
request_header_access Mime-Version allow all 
request_header_access Retry-After allow all 
request_header_access Title allow all 
request_header_access Connection allow all 
request_header_access Proxy-Connection allow all 
request_header_access User-Agent allow all 
request_header_access Cookie allow all 
request_header_access All deny all

  • To start squid proxy service, run the following commandTo start using squid, edit your browser or program settings to start using the server IP and port.
    • service squid start
  • 0 Korisnici koji smatraju članak korisnim
Je li Vam ovaj odgovor pomogao?

Vezani članci

How to create a OpenVPN VPN Server on CentOS 6 64bit.

First let's prepare your vps. Type in the following on ssh. yum update -y Now you are ready to...

How To Install cPanel/whm on CentOS

  Step One—Update your System To begin the cPanel installation, log into your server as “root”....

How to install kloxo on CentOS 5

Kloxo Installation GuidePrerequisites1) A server running CentOS 5 32bit.2) At least 512 MB of RAM...

How to install VNC Server on CentOS 6

How to install VNC (GNOME) Server on CentOS 6 First Open up your server via SSH.Make sure your...

How To Install zPanel on CentOS 6

About zPanel zPanel is a php-based free control panel for windows, mac, and linux servers. The...