Setting Up a Transparent Proxy

A proxy server is a server that acts as an intermediary for requests from clients seeking resources from other servers.

A proxy server can serve the following purposes:

  • To keep machines behind it anonymous (mainly for security).
  • To speed up access to resources (using caching). Web proxies are commonly used to cache web pages from a web server.
  • To apply access policy to network services or content, e.g. to block undesired sites.
  • To log / audit usage, i.e. to provide company employee Internet usage reporting(optional).
  • To bypass security / parental controls.
  • To circumvent regional restrictions.

A proxy can be used for:

  • Filtering– to control the access of certain web contents and to make sure that Internet usage conforms to acceptable use policies. This is commonly used in commercial or non-commerical organizations and schools. The most recommended web content filtering for open source is Dansguardian.
  • Caching– to speed up access to frequently requested websites by placing them in the cache. This increases performance and reduces upstream bandwith usage and cost. This is commonly used by ISPs and large businesses. The recommended open source caching proxy is Squid (which is the one we will be using later for setting up the transparent proxy).

A proxy can either be:

  • Authentication proxy– one that requires username and password and is commonly used when filtering.
  • Transparent proxy– one that can not be detected by the browser ( i.e. transparent to the browser thus, it does not know that a proxy is being used)

************************************************************************************************************

Now to set up the transparent proxy in Kahelos, we will be using Squid. (Note: This does not include setting the policies and access, just setting up the proxy)

To intall Squid, just type $pacman -S squid in your terminal.

*While installing squid, I encountered an error with my extra packages. To resolve that, I used $pacman -Sy squid

After successfully installing Squid,  we now go to configuring. To do that, we need to get into /etc/squid/squid.conf

  1. If you want to view the contents of your config file, use the more, cat, or less command (e.g. $more /etc/squid/suid.conf)
  2. The output of the command should look like this
  3. If you want to remove the comments, try using this command: sed -i “/^#/d;/^ *$/d” /etc/squid/squid.conf
  4. Edit the config file, type $nano /etc/squid/squid.conf
  5. Look for the line that contains http_port 3128 (the default port where Squid binds to) and append the word transparent

It should look like this : http_port 3128 transparent

Now, to run squid, just type $ /etc/rc.d/squid start

It should run well if you did not alter anything else in the configuration. (For more configuration options, check the reading materials at the end of this post)

To check if your proxy if already working:

  • Go to your browser and click Edit > Preferences and a dialog box will appear

  • Go to Advanced then  view the Network tab and click Settings


  • On the dialog box that will appear, choose Manual proxy configuration. Type your IP address on the HTTP Proxy and click OK.
  • Try searcing in your browser and this error should appear.

Your proxy is now running.🙂

Useful reading materials:

https://wiki.archlinux.org/index.php/Squid
http://wiki.squid-cache.org/Features/Authentication
http://wiki.squid-cache.org/

Sources:

http://en.wikipedia.org/wiki/
https://support.smoothwall.net/
Sir Renan

  1. Woh I your posts , saved to fav! .

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: