How to install Squid Proxy on Ubuntu

  • 147
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    147
    Shares

Squid is a popular proxy tool used by major proxy companies. This tool helps to forward proxy and reverse proxy. In this tutorial we will show you how to install Squid Proxy on Ubuntu and setup a simple HTTP proxy connection with username and password authentication.

This tutorial were tested on Ubuntu 14 | 64-bit.

How to

Install Ubuntu 14 | 64-bit on your VPS. First we need to ensure that the latest packages have been installed.

apt-get update

 

Now you have installed the latest packages, now we have to install squid application and htpasswd. To install both at a time type this command.

apt-get install squid apache2-utils

 

After squid and apach2-utils installation completes. We need to move the original squid.conf file for a helpful reference.

 

sudo mv /etc/squid3/squid.conf /etc/squid3/squid.conf.default

 

Now create the file that stores the Squid proxy account details.

touch /etc/squid3/squid_passwd
chown proxy /etc/squid3/squid_passwd

 

Next, open squid.conf using a text editor, with the following command.

nano /etc/squid3/squid.conf

 

Now add the following command lines given below as it is.

auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/squid_passwd
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
http_port 8080
forwarded_for off
request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control allow all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent allow all
request_header_access Cookie allow all
request_header_access All deny all

After pasting the command lines, you need to save the file. Click CTRL + X and then type Y and click Enter. Now you need to create a username and password to access your proxy.

htpasswd /etc/squid3/squid_passwd your_username_here

 

That’s it, everything is done. Now the last step is to restart Squid service.

service squid3 restart

Open browser on your computer and enter your VPS IP and enter the username and password that you generated earlier. To check your IP address you can visit whatismyipaddress.com

The following two tabs change content below.

Unallocated Author

Please note that the article you are reading has an unallocated author as the original author is no longer employed at latesthackingnews.com, this has been put in place to adhere with general data protection regulations (GDPR). If you have any further queries, please contact: [email protected]

Unallocated Author

Please note that the article you are reading has an unallocated author as the original author is no longer employed at latesthackingnews.com, this has been put in place to adhere with general data protection regulations (GDPR). If you have any further queries, please contact: [email protected]

Leave a Reply