LinuxTutorialsUbuntu

How To Install Tinyproxy on Ubuntu 14.04

Install Tinyproxy on Ubuntu 14.04

In this tutorial, we will show you how to install and configuration of Tinyproxy on your Ubuntu 14.04 server.  For those of you who didn’t know, Tinyproxy is a lightweight HTTP/HTTPS proxy daemon for POSIX operating systems. Designed from the ground up to be fast and yet small, it is an ideal solution for use cases such as embedded deployments where a full-featured HTTP proxy is required, but the system resources for a larger proxy are unavailable.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of Tinyproxy on a Ubuntu 14.04 server.

Tinyproxy features

  • Anonymous mode: Allows specification of individual HTTP headers that should be allowed through, and which should be blocked.
  • HTTPS support: Tinyproxy allows the forwarding of HTTPS connections without modifying traffic in any way.
  • Remote monitoring: Tinyproxy can be monitored remotely to view logs and access details.
  • Load average monitoring: Tinyproxy can be configured to refuse connections after the server load reaches a certain point.
  • Access control: Tinyproxy can be configured to only allow connections from certain subnets or IP addresses.
  • Secure: With some configuration, Tinyproxy can be made to run without any special privileges, thus minimizing the chance of system compromise. Furthermore, it was designed with an eye toward preventing buffer overflows.
  • Small footprint: Tinyproxy requires very little in the way of system resources – the memory footprint tends to be around 2MB with glibc, and the CPU load increases linearly with the number of simultaneous connections (depending on the speed of the connection). Therefore, Tinyproxy can be run on a spare, older machine without any impact on performance.
  • URL-based filtering: Tinyproxy allows domain and URL-based black- and whitelisting.
  • Transparent proxying: Tinyproxy supports being configured as a transparent proxy so that a proxy can be used without requiring any client-side configuration.
  • Proxy chaining: Tinyproxy can use an upstream proxy server for outbound connections, instead of direct connections to the target server, creating a so-called proxy chain.

Prerequisites

  • A server running one of the following operating systems: Ubuntu 14.04, and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for Tinyproxy.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Tinyproxy on Ubuntu 14.04

Step 1. First, make sure that all your system packages are up-to-date by running the following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Tinyproxy on Ubuntu.

Tinyproxy can be installed from the default Ubuntu repositories with:

apt-get install tinyproxy

Once the installation is complete, open the Tinyproxy configuration file with your editor of choice:

nano /etc/tinyproxy.conf

By default, Tinyproxy will only accept connections from 127.0.0.1. Scroll down to the authorization controls section and add your local computer’s IP address to the allowed list:

Allow 127.0.0.1
Allow your.local.ip.address

Before you close this, note the port that Tinyproxy will be listening on.  By default it’s 8888, as given by the line:

Port 8888

Save the configuration and restart the service:

/etc/init.d/tinyproxy restart

Step 3. Set up a cron job Tinyproxy.

Set up a Cron task to restart Tinyproxy periodically:

crontab -e

And add the following lines:

0 2 * * * /etc/init.d/tinyproxy restart

Congratulations! You have successfully installed Tinyproxy. Thanks for using this tutorial for installing Tinyproxy on your Ubuntu 14.04 system. For additional help or useful information, we recommend you check the official Tinyproxy website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button