Community discussions

MikroTik App
 
User avatar
dlabreu
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri May 08, 2009 10:14 am
Location: South Africa

Transparent proxy with Squid.

Sat Jan 19, 2013 10:39 pm

Hi to all.

I would like some help in a problem that i have on my firewall.

I have in my network a Squid box running as a proxy , so what i want to do is to get all traffic going out on potr 80 redirect to my squid box on port 3128 like that i can make a transparent proxy.

Here it is my firewall rule on my mikrotik
action=dst-nat chain=dstnat comment=WEBPROXY disabled=yes dst-port=80 \
in-interface=ether2 protocol=tcp src-address=10.0.0.0/24 to-addresses=\
10.0.0.81 to-ports=3128

Every thing look right for my but it does not work if i set the proxy on the web browser work no problem but my firewall rule does not work at all.

I just would like to know if i am doing something wrong.

Thanks for all help.

DAniel
 
mixig
Member
Member
Posts: 316
Joined: Thu Oct 27, 2011 2:19 pm

Re: Transparent proxy with Squid.

Sun Jan 20, 2013 3:14 am

in your rule you have disabled=yes mistake?
 
User avatar
dlabreu
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri May 08, 2009 10:14 am
Location: South Africa

Re: Transparent proxy with Squid.

Sun Jan 20, 2013 2:08 pm

Hi There , thanks for your input i shuld remove that from the post , i disable the rule because it was not working , but even if i enable it does not work do you have any idea why?

Thanks
 
Markut
just joined
Posts: 16
Joined: Sat Nov 03, 2012 11:03 pm

Re: Transparent proxy with Squid.

Sun Jan 20, 2013 2:42 pm

Try changing squid address (10.0.0.81 to 172.16.x.x eg.) different from 10.0.0.0/24 src-address.
 
User avatar
dlabreu
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri May 08, 2009 10:14 am
Location: South Africa

Re: Transparent proxy with Squid.

Sun Jan 20, 2013 2:47 pm

I try that and it work , i just really would like to know if this is the only way?

Thanks
 
User avatar
tomaskir
Trainer
Trainer
Posts: 1162
Joined: Sat Sep 24, 2011 2:32 pm
Location: Slovakia

Re: Transparent proxy with Squid.

Sun Jan 20, 2013 2:52 pm

By default (apt-get install squid) squid does not support transparent proxying. You have to compile it yourself with the right arguments to make it work in transparent mode.

Are you sure the problem is not in squid?