Code: Select all
WAN LINK
|
------------- ---------------------------
| Mikrotik Box | | Ubuntu Server with squid3 |
------------- ----------------------------
| /
| /
----------------------
| Switch ( Cheap one ) |
----------------------
| | |
Client1 Client2 Client3 etc.
1. http_port 8080
2. acl localhost src xxx.xxx.xxx.xxx(Ubuntu server IP)
3 acl to_localhost dst xxx.xxx.xxx.xxx(Mikrotik router gateway) I assume that redirected http from Mikrotik router will be redirect again to Mikrotik router.
4. uncomment access log /var/log/squid3/access.log
5. add visible_hostname myname
save squid.conf and restart squid3 server.
Then I have added nat rule in Mikrotik router
ip/firewall/nat
Code: Select all
1. add chain=dstnat src_address=xxx.xxx.xxx.xxx(ununtu server IP) dst-port=80 protocol=tcp action=accept
2. add chain=dstnat src_address=xxx.xxx.xxx.xxx/28(LAN address) dst-port=80 protocol=tcp action=dst-nat to-address=xxx.xxx.xxx.xxx(ununtu server IP) to-port=8080