Saturday, August 18, 2007

How To : Creating a Transparent Web Proxy

Web proxy allows clients to make indirect network connections to other network services. A client connects to the proxy server, then requests file, or other resource available on a different server. Web proxy performs Internet object cache function by storing requested Internet objects, i.e., data available via HTTP and FTP protocols on a system positioned closer to the recipient than the site the data is originated from. Transparent proxy performs request caching invisibly to the end-user. This way the user does not notice that his connection is being processed by the proxy and therefore does not need to perform any additional configuration of the software he is using. To setup transparent proxy follow the steps listed bellow

1. Configure the router to redirect all connections coming from clients (we assume that clients are connected to routers ether1 interface) to port 80 to the web proxy listening on port 8080, by adding the following destination NAT rule:

[admin@MikroTik] >ip firewall nat add in-interface=ether1 dst-port=80 \
\... protocol=tcp action=redirect to-ports=8080 chain=dstnat

2. Specify DNS server:

[admin@MikroTik] ip dns set primary-dns=195.2.96.2

3. Enable the proxy on port 8080:

[admin@MikroTik] ip web-proxy set enabled=yes port=8080 transparent-proxy=yes

Notice that only HTTP traffic is supported in transparent mode of the web proxy. HTTPS and FTP protocols are not going to work this way.

3 comments:

Lcm said...

Please i'am trying to implement a transparent proxy with parent proxy, and i cant get https throw proxy, can you give me any help, mikrotik v2.9.27
you can reply to lcm@cesupa.br and lcmm84@yahoo.com.br

Bukkie Boy said...

Hi
Which of the ethernet port is ether1 the internet or the local Area Network!?

Bukkie Boy said...

Please mail me the an answer please