Page 1 of 1

how to redirect http traffic from MT to squid

Posted: Tue Mar 04, 2014 12:48 am
by obomz
Hello,

I have been on the case of trying to include a squid into my network for quite a while now!
the following is the situation so far.

Wan>>16port Dlink switch>>Clearos>>mikrotik>>netequalizer>>24 port Dlink switch







I have added a squid with its input from the Wan directly and then I have put the squid directly to the mikrotik. I did the following configurations:


Wan:
Wan - mikrotik 172.16.10.1/24
Wan - squid 172.16.11.1/24


Mikrotik


Ether1
172.16.10.2/24


Ether2 hotspot
10.5.50.1/24


Ether3 to squid
192.168.50.2


Squid


Ether1 from Wan
172.16.11.2


Ether2 from mikrotik
192.168.50.1:3128


The squid is configured transparently.


Now I have tried several CLI commands I have seen online and still yet I am yet to find one that will eventually push the http traffic to the squid.


I would appreciate any help that I can get to make this happen.


Thanks in advance.

Re: how to redirect http traffic from MT to squid

Posted: Tue Mar 04, 2014 1:35 am
by SurferTim
Your explanation is not very clear. Why don't you use a dstnat rule? From what I can tell, you have two localnet interfaces (10.5.50.0/24 and 192.168.50.0/24) and one wan interface. Try this:
/ip firewall nat
add chain=dstnat action=dst-nat protocol=tcp dst-port=80 src-address=10.5.50.0/24 to-addresses=xx.xx.xx.xx to-ports=3128
add chain=dstnat action=dst-nat protocol=tcp dst-port=80 src-address=192.168.50.0/24 to-addresses=xx.xx.xx.xx to-ports=3128
Replace xx.xx.xx.xx with the squid server ip.