Community discussions

MikroTik App
andrescamino
Member Candidate
Member Candidate
Topic Author
Posts: 198
Joined: Wed Aug 19, 2009 7:07 pm
Location:Guayaquil-Ecuador

Problems with squid proxy and mikrotik firewall

Wed Sep 30, 2009 12:47 am

Hi,

I have a problem to redirect the mikrotik router to the port 3128 of the squid in another machine, I would like to know what do I have to change in my configuration:

Initially I have a proxy server in CentOS with squid and Firestarter (which makes NAT), the port that squid is listening is 3128
I have also a mikrotik router with NAT to pass the internet to my computer but in order to actually have internet in my computer i have to configure the proxy settings in my browser.

Then I tried to configure those settings inside of the router to make it transparent to the computers and not change the browser configurations in every computer. I tried this

/ip firewall nat add chain=dstnat dst-address=192.168.2.1/32 port=6(tcp) dst-port=80 in-interfaces=ether1 action=redirect to-port=3128

where 192.168.2.1 is the gateway to reach the squid in my centos proxy

When I take out the proxy settings in my web browser I don´t have internet, I still need the browser configuration.
Can you give me any suggestion to make it transparent from the router and not from the squid itself?

Thanks for your advices in advance
Top
kthameen
Frequent Visitor
Frequent Visitor
Posts: 87
Joined: Wed Dec 21, 2005 4:22 am
Location:Leuven,Belgium

Re: Problems with squid proxy and mikrotik firewall

Wed Sep 30, 2009 3:29 am

Hi,

You need to make your squid ready to interecpt packets sent from mk so u just need to edit your squid.conf file which should be in this dir on centos /usr/local/squid/etc and add the word "transparent" after "http_port 3128" then reconfigure squid or restart it, best regards
Top
andrescamino
Member Candidate
Member Candidate
Topic Author
Posts: 198
Joined: Wed Aug 19, 2009 7:07 pm
Location:Guayaquil-Ecuador

Re: Problems with squid proxy and mikrotik firewall

Wed Sep 30, 2009 4:56 pm

Hi kthameen,

I actually did it, i added the "transparent" after the port and saved it then restarted the squid but still is not working.
Do you know what would be the problem?, thanks for your help
best regards
Top
andrescamino
Member Candidate
Member Candidate
Topic Author
Posts: 198
Joined: Wed Aug 19, 2009 7:07 pm
Location:Guayaquil-Ecuador

Re: Problems with squid proxy and mikrotik firewall

Thu Oct 01, 2009 5:02 pm

Hi,

Is really any way to avoid making transparent the proxy and set the configuration to redirect to the port 3128 from the mikrotik router?

thanks
Top
kthameen
Frequent Visitor
Frequent Visitor
Posts: 87
Joined: Wed Dec 21, 2005 4:22 am
Location:Leuven,Belgium

Re: Problems with squid proxy and mikrotik firewall

Sat Oct 03, 2009 2:19 pm

which squid version are you using ?
Top
User avatar
maroon
Member Candidate
Member Candidate
Posts: 230
Joined: Thu Oct 07, 2004 11:15 am
Location:Lebanon
Contact:

Re: Problems with squid proxy and mikrotik firewall

Wed Oct 14, 2009 4:51 pm

did you solve your problem? please check the firewall rules.... on what port the squid is listening?
Top
jfilippo
Trainer
Trainer
Posts: 3
Joined: Tue Jun 02, 2009 9:55 pm

Re: Problems with squid proxy and mikrotik firewall

Tue Nov 10, 2009 4:53 am

也许,如果不是误解,恕我直言,你有一个浓缩的eptual error. You have to redirecttoyour Squid every request with dst-port 80, by means of adst-nat, not aredirect, because de redirection direction must be the Squid expernal IP. If you did the "transparent" thing insquid.conf, try this rule in your Mikrotik:

/ip firewall nat
add action=dst-nat chain=dstnat comment="JFilippo - Prueba Proxy" disabled=no \
dst-port=80 protocol=tcp src-address=!10.1.0.192 to-addresses=10.1.0.192 \
to-ports=3128

In this export, my Squid server has the 10.1.0.192.

Good luck!
Top
andrescamino
Member Candidate
Member Candidate
Topic Author
Posts: 198
Joined: Wed Aug 19, 2009 7:07 pm
Location:Guayaquil-Ecuador

Re: Problems with squid proxy and mikrotik firewall

Wed Nov 11, 2009 7:27 pm

Thanks you all guys....it worked
Top

Who is online

Users browsing this forum:Ahrefs [Bot],Bing [Bot]and 19 guests