Install Squid as HTTP and HTTPS Proxy Server

While creating the vSearch 3.0, we needed a HTTP/HTTPS proxy server to test the new features like public cloud support. With a little search, I found the Squid server. It turned out to be pretty easy to install a new one and use it based on default settings.

Install
Like most of the software package on CentOS, Squid can be installed using the yum command line. Here is what’s needed to install and configure it.

Lost VMs or Containers? Too Many Consoles? Too Slow GUI? Time to learn how to "Google" and manage your VMware and clouds in a fast and secure HTML5 App.

# yum -y update
# yum -y install squid

After installing the software, you can now verify with the squid command which will give you a long output in the console.
# squid -v

To run the service,
# systemctl start squid

To make sure the service starts every time the OS boots, you can type the following command.
# systemctl enable squid

By default, the proxy service runs on the port 3128 for both HTTP and HTTPS. Unless you want to change to a different port, you don’t need to configure anything.

Configure Browsers
To test out if Squid is working as expected, you can use a browser to give it a try. For me, I want to make sure the Squid is working perfectly before moving on testing our product.

With Firefox, you can open the Options by typing the “about:preferences” in the URL field. After clicking on the Advanced on the left side menu and then picking the Network tab on the main content, you will see the “Setttings…” button. In the “Connection Settings” dialog box, you will pick up the “Manual proxy configuration” and enter the IP address of the proxy server in the “HTTP proxy” field and 3128 as the port number. To make it simple, you can check the “Use this proxy server for all protocols.”

With Chrome, you can type in “chrome://settings/” in the URL field. On the page, you want to click on the “Show advanced settings…” at the bottom. Scroll down to the Network section and click on the “Change proxy settings…” button. That would bring up the “Internet Properties” dialog box. Continue to click on the “Settings” button to bring up another dialog box. In the Proxy server section, chech the “Use a proxy server for this connection (These settings will not apply to other connections). You can enter the address and port there and select “Bypass proxy server for local addresses.” If you want to configure different proxy servers for different protocol, you can click on the “Advanced” button.

The IE is pretty much the same as Chrome once you find the Network settings. Both Chrome and IE actually use the Windows sysstem settings. If if you change from one, the other should work automatically.

Troubleshooting Proxy Server

If the proxy does not work, you may want to first make sure the proxy itself can reach out to the Internet. If itself cannot, neither can it proxy others. That may involde poke a hole in your firewall so that the proxied protocols are allowed from this proxy IP address.

Secondly, you want to ping the proxy server from the browser computer. To avoid any DNS issue, you may want to use IP address of the proxy server instead of DNS name. If you have firewall on the proxy server, make sure the port 3128 is open to anyone.

This entry was posted in Applications & Tools and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Posted July 28, 2016 at 6:25 pm | Permalink

    Install Squid as HTTP and HTTPS Proxy Server https://t.co/dQCwMDPsh5 via @sjin2008

  2. Posted July 28, 2016 at 10:39 pm | Permalink

    Install Squid as HTTP and HTTPS Proxy Server https://t.co/HQQEpt5LBd

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  • NEED HELP?


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__ doublecloud.org.

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.