Sunday 2 September 2012

Mikrotik Web Proxy


Howto to enable Mikrotik Web Proxy in Transparent Mode


Web proxy is a service that is placed between a client and the internet for HTTP web surfing. It can cache certain contents / http pages in its local cache. Mikrotik have basic PROXY package builtin called WEB PROXY. It is suitable for basic caching for small to mid size networks.
For advance caching capabilities, Use 3rd party external proxy server like SQUID.

MikroTik WEB.PROXY Recommendation


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
As shown in the image below.


ow 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.
As shown in the image below.




2# Configuring Web Proxy

Now We have to Enable Mikrotik Web Proxy by navigating to 
IP > WEB PROXY

As shown in the image below.

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 using5 GB in this example. The cache size is really based off of how much RAM you have in the machine
As shown in the image below . . .





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

As shown in the image below
 . . .


.
Now goto Action Tab,
In Action, Select redirct
In To Ports, Type 8080
As shown in the image below . . .


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.


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

16 comments:

  1. i try it bt not working with my rb 450-g.... iam using 2 wan pcc with hotspot....is that another way for hotspot.....? in nat rule /ip firewall nat add action=redirect chain=dstnat disabled=no dst-port=80 protocol=tcp to-ports=8080 no bytes upp its stays 0n 0 bytes...

    ReplyDelete
  2. This is very good to know that I can open blocked blogger and I tried this and found a way and quick way you will be shocked to see.
    Reddit UK proxy

    ReplyDelete
  3. bhai pc ma mikrotike acha chalta hai kia ya routerboard ma

    ReplyDelete
  4. Nice see more------------http://www.mikrotikroutersetup.blogspot.com

    ReplyDelete
  5. I salute to the admin of this diary. i actually like and that i can sure as shooting advocate this diary to my friends.
    Files Tube UK proxy

    ReplyDelete
  6. You can information about internet marketing that are published on reputed sites. He has a very nice understanding about Web development company delhi

    ReplyDelete
  7. I think you made awesome decision the moment when you choose this topic of the blog article here. Very useful information

    access Bomb-mp3 in UK

    ReplyDelete
  8. Your blog give many information thanks for share this informative article.
    access TorrentCrazy in UK

    ReplyDelete
  9. This article is very informative and cool. Thanks for share this beautiful article.
    access Mp3Raid in UK

    ReplyDelete
  10. Your this blog giving us information about subjected topic. Thanks for doing this
    Torrentz UK proxy

    ReplyDelete
  11. Thank you for this post. I want to share with people this site proxy browser

    ReplyDelete
  12. The proxy site is very important for the business people because the proxy give the protection for the website and they can protect the site from unauthorized people which they can want to access it.
    access Files tube in UK

    ReplyDelete
  13. Amazing blog! I really like the way you explained such information about this post to us. And a blog is really helpful for us this website.
    Fabfilter Total Bundle Mac Crack
    Pro Tools HD Crack
    MikroTik Crack
    ApowerMirror Crack
    Rc 20 Retro Color Mac Crack
    Ni Massive X Win Crack
    Sonnox Oxford Bundle Mac Crack

    ReplyDelete