Squid Proxy Configuration

From LinuxFanBoy

Jump to: navigation, search

If you forgot to install squid during the install you can install squid after the fact with.

 yum install squid

squid comes setup to ... by default. To allow a network to use it, edit /etc/squid/sqid.conf

 visible_hostname computername
 http_access allow our_networks
 acl our_networks src 192.168.1.0/255.255.255.0

Save the file.

Stop squid

 service squid stop

Create the need disk space for squid

 squid -z

Start squid

 service squid start

Make sure the port is open in iptables.

 netstat -tulpn | grep 3128

If you don't get any output you will need to edit iptables.

 service iptables save
 vi /etc/sysconfig/iptables

Add this line

 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3128 -j ACCEPT

and restart iptables and check it again.

 service iptables restart
 netstat -tulpn | grep 3128

Don't forget to make sure squid starts when your reboot.

 chkconfig squid on