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:
- visible_hostname
- #acl our_networks src 192.168.1.0/24 192.168.2.0/24
- #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:
- Backup /etc/squid/squid.conf
# vi /etc/squid/squid.conf
- Add the following line near the comments associated with visible_hostname:
visible_hostname server2
- Add the following two lines near the http_access command
acl our_networks src 192.168.1.0/24
http_access allow our_networks
- Save the file
# squid -z
- Run from the command line:
# system-config-securitylevel
- Add other port
3128 tcp
- Set SElinux
# setsebool -P squid_connect_any 1
- Set squid to start when you reboot linux
# chkconfig squid on
- Start squid
# service squid start
- Configure the client browser as following: > Tools > Internet option > Network settings > and setup Squid server IP address and port # 3128.


