Walker News

How To Setup Squid Proxy Server On RHEL 5.2 In 3 Minutes?

You only need 3 minutes or less to setup proxy server in RHEL 5.2 using the bundled squid 2.6. If you are familiar with Linux and type fast, probably can be done in a minute :-)

Assumptions of this 3-minute Linux-Proxy Server setup guide:

1) Uses squid 2.6 on Red Hat Enterprise Linux 5.2. However, it should be good as a reference for applying on other Linux distributions with newer version of squid proxy server.

2) The squid proxy server is neither configured to support user authentication nor to enforce strict access control using ACL, i.e. proxy client (e.g. your web browser) doesn’t need to login to proxy server for web browsing and it doesn’t block or filter websites by time, user name, client’s IP address, etc.

Steps to configure squid proxy server on RHEL

Though this simple configuration does not harness the full power of squid proxy server, it is good for sharing Internet access among computers.

1) Install squid 2.6 that bundled with RHEL 5.2 DVD/CD, if it is not currently installed.

To check if squid is already installed, run this command:
rpm -qa --last | grep squid

Assume the RHEL 5.2 DVD/CD is mounted to /media directory, then this command will install squid to Linux:
rpm -Uvh /media/Server/squid-2.6.STABLE6-5.el5_1.3.i386.rpm

2) Open /etc/squid/squid.conf with vi (or any text editor) and configure these key settings (leave all other settings in the .conf file with default state/value):
  • http_port 8080 – the proxy server listening port number (change 8080 to something else if you like to but make sure you remember to specify this port number precisely in a web browser’s proxy configuration).
     
  • acl all src 0.0.0.0/0.0.0.0 – define Access List called “all” that uses ACL type “src” to allows any clients to connect with this squid proxy server.
     
  • http_access allow all – simple disable access lists and thus allow full access to any websites by any users (how nice).
     
  • visible_hostname freeproxy – you need this setting using any name you like (as the name of proxy server), if squid fails to start and log a message “FATAL: Could not determine fully qualified hostname. Please set visible_hostname” in the squid log file (/var/log/squid/squid.out).
     
  • acl Safe_ports port 80 – at least allows proxy client to browse websites (most web servers are listening to port 80). By default, this setting is turned on but just make sure it is enabled on your setup.

If you like to disable the squid proxy server log files (so that nobody can “easily” trace your web browsing history), then configure these settings too:
access_log none
cache_store_log none

To configure squid to start up automatically on each Linux reboot to runlevel 3, 4, and 5:
chkconfig --level 345 squid on

To start / stop / restart squid proxy server:
service squid start
service squid stop
service squid restart

That is all you need to get squid proxy server up and running in Linux to achieve a simple purpose. Do you need one minute to exercise the steps (if eliminate time of reading my lousy guide). Good luck.

Custom Search

  1. soe moe 30-07-10@07:20

    Dear Sir or Madam….

    May i introduce myself. My name is soemoe. I am studying in Russia. I was interested about Networking. Now i am trying to create “Squid proxy server” on Redhat Enterprise 5. My internet connection is “Obtain an ip address automatically ” Assigned by DHCP. Step by step I did configure /squid.conf file. Finally my web broswer is not work. Sir, if my request are not disturb for you, pls help me and plz explain me.I thank you awfully and for your help. I will send my error web browser screenshot pic.

    Kindly advise.

    Looking forward to hearing from you!

    With best regards,
    Soe Moe

2017  •  Privacy Policy