Howto to enable Mikrotik RouterOS Web Proxy in Transparent Mode

Howto to enable Mikrotik RouterOS Web Proxy in Transparent Mode


Always try NOT to use the same storage disk to store your your cache and your your Router OS, to ensure there is always enough space on your router OS Disk for logs, upgrade / update packages & Backups. Therefore It is highly recommended that the web-proxy cache is stored on a physically separate drive (store) other than the Router OS. Placing the cache on a separate drive ensures maximum performance and reduces problems if the disk becomes full or fails as the OS will then still be OK! Caching Internet access will require a lot of read and writes to the disk, chose fast disk as for maximum performance / concurrent user request support. Cache performance also largely depends on RAM size, the More RAM you have in your server, the Better performance you will get. We will divide this article in 3 Sections.

1# Preparing Secondary Partition for Cache 
2# Configuring Web Proxy
3# Transparent Proxy Let’s BEGIN . . .


1# Preparing Secondary Drive for CACHE First we will Format secondary harddrive (to be used for cache ), IF YOU DON’T WANT TO USE SECONDARY HARD-DIVE, SKIP THIS STEP. Goto SYSTEM > STORES > DISKS Select the Secondary Hard drive and click on FORMAT DRIVE


Now go to STORES tab (by navigating to SYSTEM > STORES) Select the WEB-Proxy package and click on COPY It will ask you where to copy WEB-Proxy package, Select Secondary Drive in TO box.

2# Configuring Web Proxy Now We have to Enable Mikrotik Web Proxy by navigating to IP > WEB PROXY
Now Click on “Enable” in Port, Type 8080 Max Cache Size , Select Unlimited from drop down menu, OR if you have limited Disk Space, then use your desired amount. You have to specify space in KiloBytes for example 1024 KB = 1MB , so if you want to set 5 GB Cache, then use 5242880 , I am using 5 GB in this example. The cache size is really based off of how much RAM you have in the machine


Click on Apply and your Mikrotik’s Web Proxy is Ready to be used, But Every client have to set proxy address pointing to Mikrotik IP to be able to use Proxy Service. 3# Transparent Proxy If we want that every user must be automatically redirected to Proxy transparently, then we have to create additional rule to forcefully redirect users to proxy service, which is called TRANSPARENT PROXY. . Goto IP > FIREWALL > NAT and create new rule In Chain , Select dsntant, In Protocol, Select 6 (tcp) In Dst. Port, Type 80
Now goto Action Tab, In Action, Select redirct In To Ports, Type 8080
Now your newly created rule will look like something below image. As shown in the image below . . .
OR the CLI version of above rule would be something like below.


 /ip firewall nat add action=redirect chain=dstnat disabled=no dst-port=80 protocol=tcp to-ports=8080

Done. Now Mikrotik web proxy will perform as TRANSPARENT PROXY , Every user’s HTTP PORT 80 request will automatically be redirected to Mikrotik built-in Web Proxy. You can View Proxy Status and other info via going to IP > WEB PROXY > SETTINGS > STATUS and other tabs in the same window.


For More Detail Visit :- http://aacable.wordpress.com/2011/12/29/howto-to-enable-mikrotik-routeros-web-proxy-in-transparent-mode/

Newer Post Older Post

One Response to “Howto to enable Mikrotik RouterOS Web Proxy in Transparent Mode”