Friday, August 26, 2011

How to install and configure Tinyproxy, a lightweight proxy server

June 20, 2010 by  
Filed under General

1 Comment

Tinyproxy is a light-weight HTTP 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. Tinyproxy is free software, and is distributed using the GNU GPL license (version 2 or above).


Installation

* On Fedora, Red Hat Enterprise Linux, or its derivatives such as CentOS, install Tinyproxy from the EPEL repository by running

yum install tinyproxy

* Ubuntu or Debian users can run the following command

sudo apt-get install tinyproxy

* FreeBSD, OpenBSD or NetBSD users can use the pkg_add utility to install the tinyproxy package.
* Mac OS X users should check MacPorts to see if the Tinyproxy port there is recent enough.

Optionally, you may visit the download page and install from the source if binary for your system is not available.


Manual

You may look at the manual page before you jump for configuration

man tinyproxy tinyproxy.conf

Configuration

* Use a text editor (e.g. nano, vi) change these lines in the tinyproxy config file. The config file is /etc/tinyproxy/tinyproxy.conf. If you don’t see it here, you may try finding it.

Adjust the port to use for proxy.  I prefer using 8080

The Unreal Universe
A Book on Physics and Philosophy
Pages: 292
(282 in eBook)
Trimsize: 6" x 9"
Illustrations: 34
(9 in color in eBook)
Tables: 8
Bibliography: Yes
Index: Yes
ISBN:
9789810575946 
TheUnrealUniverse

#
# Port to listen on.
#
Port 8080

Now, you need to set from which URLs you should be able to connect. You should use your computer’s external IP only if you want to use as private proxy. You may also consider authorizing for proxy. Please read the manual for more information about authorization.

# Also the order of the controls are important. The incoming connections
# are tested against the controls based on order.
#
Allow 127.0.0.1

Allow xxx.xxx.xxx.xxx

Replace the xxx.xxx.xxx.xxx with your computer’s external IP address.


If you want to filter the URLs you may adjust the following sections:

#
# The location of the filter file.
#
Filter “/etc/tinyproxy/filter”

#
# Filter based on URLs rather than domains.
#
FilterURLs On

Configuration is completed. Now restart the service to affect the new configuration:

sudo /etc/init.d/tinyproxy restart

Your proxy server is now ready. Now open the Network settings of your browser and enable proxy. Put the server’s IP address in the proxy hostname/address box and 8080 (put what you set above) as proxy port. Now, your page requests will be served through your proxy.


Tinyproxy is extremely lightweight however, you may restart it occasionally to refresh memory usages. You may also set a cron job to do it automatically.


# Change loglevel to connect, or even Warning to limit log traffic
LogLevel Connect

# Port to listen on.  Select a random 4-digit number.  Well-known ports are being filtered.
Port 7562

# Filter based on URLs rather than domains.
FilterURLs On

# Comment out any other Allow statements, replace with these below
Allow 127.0.0.1
# The IP below should should be your computer's external IP
Allow x.x.x.x

GD Star Rating
a WordPress rating system
How to install and configure Tinyproxy, a lightweight proxy server, 10.0 out of 10 based on 1 rating
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Related posts:

  1. Install and configure munin (and munin-node) for Server Monitoring
  2. Install SSL certificate on Windows Server 2000 / 2003
  3. Installing DirectAdmin in dedicated server
  4. Install WordPress using Fantastico in cPanel
  5. Installing WHMSonic Admin Pro in cPanel server

Comments

One Response to “How to install and configure Tinyproxy, a lightweight proxy server”
  1. Tanmoy says:

    How can I allow dynamic IP? Let, I use GP for internet connection. How can I configure my VPN to allow dynamic IP?

    GD Star Rating
    a WordPress rating system
    Reply

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!
Click here to cancel reply.