February 14, 2009

Howto: Configure Apache Squid Proxy Server on CentOS 5

Squid is installed by default when you install Apache.

To configure squid.conf file you need to modify three lines:

  1. visible_hostname
  2. #acl our_networks src 192.168.1.0/24 192.168.2.0/24
  3. #http_access allow our_networks

To setup a squid proxy server on the computer named server2 which is on the 192.168.1.0/24 network, do the following:

  1. Backup /etc/squid/squid.conf
  2. # vi /etc/squid/squid.conf
  3. Add the following line near the comments associated with visible_hostname:
    visible_hostname server2
  4. Add the following two lines near the http_access command
    acl our_networks src 192.168.1.0/24
    http_access allow our_networks
  5. Save the file
  6. # squid -z
  7. Run from the command line:
    # system-config-securitylevel
  8. Add other port
    3128 tcp
  9. Set SElinux
    # setsebool -P squid_connect_any 1
  10. Set squid to start when you reboot linux
    # chkconfig squid on
  11. Start squid
    # service squid start
  12. Configure the client browser as following: > Tools > Internet option > Network settings > and setup Squid server IP address and port # 3128.
RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)

Spread the word

del.icio.us Digg Furl Reddit Help

Permalink • Print

Related Entries

Made with WordPress and an easy to use WordPress theme • Sky Gold skin by Denis de Bernardy