How To Install Tinyproxy on Ubuntu 14.04

r00t April 16, 2016

idroot-ssh-logo

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 light-weight 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 through the step by step installation 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 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 towards 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.

Install Tinyproxy on Ubuntu 14.04

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

Step 2. Installing Tinyproxy.

Tinyproxy can be installed from the default Ubuntu repositories with:

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

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 allow list:

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

Save the configuration and restart the service:

Step 3. Setup a cron job Tinyproxy.

Set up a cron task to restart Tinyproxy periodically:

And add the following lines:

Congratulation’s! 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 to check the official Tinyproxy web site.

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 a best deal!
Share on Google+0Share on Facebook0Tweet about this on TwitterShare on Tumblr0Share on StumbleUpon1Share on Reddit1Pin on Pinterest2
The Tags:

Leave a Comment