Squid with mikrotik router
Posted
by
niren
on Super User
See other posts from Super User
or by niren
Published on 2013-10-26T08:11:49Z
Indexed on
2013/10/26
9:58 UTC
Read the original article
Hit count: 363
I tried to connect squid3 in my network to use high anonymity proxy. This is how my network is right now
WAN LINK
|
------------- -----------------------------
| Mikrotik Box | | Ubuntu Server with squid3 |
------------- -----------------------------
| /
| /
----------------------
| Switch ( Cheap one ) |
----------------------
| | |
Client1 Client2 Client3 etc.
after this setup I changed squid.conf in Ubuntu server as
http_port 8080
acl localhost src xxx.xxx.xxx.xxx(Ubuntu server IP)
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.
uncomment access log /var/log/squid3/access.log
add visible_hostname myname
save squid.conf and restart squid3 server.
Then I have added nat rule in Mikrotik router
ip/firewall/nat
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
now I can not able to access internet from client1 system, If I remove these two nat rule then I can access internet. what is wrong I have made?
© Super User or respective owner