How to use external open source caching server

From MikroTik Wiki
Jump to: navigation, search


Sometimes admin want to control users HTTP requests through custmized ACL's or other scripts.

Mikrotik can be used as PPPoE server where all PPPoE or clients on network are connected with Mikrotik directly through LAN.

Mikrotik with 3 interfaces

  1. LAN (for clients)
  2. WAN (for Internet)
  3. eth1 (for Squid)


Mikrotik simple view

501 (1).JPG

501 (2).JPG

501 (3).JPG


Squid have 2 type of networks

  1. LAN IP Address without any gateway or route address.
    Just for LAN connectivity with Mikrotik eth1 with IP Address
  2. PPPoE conection for Internet throw Mikrotik 'but' different IP Address (normal clients IP address

501 (4).jpg

Internet setup for Squid

501 (5).JPG

501 (6).JPG

Squid Internet access is working

501 (4).jpg

Time to route clients traffic to address with clients on IP's with range

Disable NAT ( IP / Firewall / NAT / masquerade srcnat

When normal client request for Internet to Mikrotik then Mikrotik all LAN network passthrow to Squid direct without any delay.

501 (7).jpg

501 (8).JPG

501 (9).JPG

501 (10).JPG

Example: Any request from network (with routing mark client), Mikrotik route this request to, and if another network request then Mikrotik route this request to WAN route

501 (11).JPG

Complete final view

501 (12).jpg