Page 1 of 1

Mikrotik with external proxy

Posted: Tue Jan 22, 2008 7:36 pm
by alessio
Good evening,
I'm trying to setup my hotspot to use an external proxy server because of I need to log every single internet connection for every single user and than I'm using squid proxy server to do this.

The problem is that if I set the Webproxy feature on MTbox what I get is that every request made by any user is passed to squid with the MTbox address and it is not ok for me.
The hotspot is not masquerading any addresses, but even if I set just the parent-proxy address and the trasparent proxy feature, I get the same behaviour.

Is there a way to redirect every connection to an external proxy server maintaining the original IP address?

Regards,
Alessio

Re: Mikrotik with external proxy

Posted: Wed Jan 23, 2008 9:29 am
by janisk
you can set up dstnat rule that will forward requests to your proxy without parent proxy feature.

the rule will look like this
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=80 protocol=tcp to-addresses=<proxy address> to-ports=<proxy port>
if proxy can reach client then client will have "transparent proxy" and will see who is requesting pages.

Re: Mikrotik with external proxy

Posted: Wed Jan 23, 2008 1:05 pm
by alessio
Hello Janisk,
thanks for your answer.
I already had tried with that configuration without success, but today I discovered that there was a configuration problem on my squid proxy server, because of upgrading it from version 2.5 to version 2.6 it changed the syntax on squid.conf file about the transparent proxy feature.

With squid proxy port=8080, and squid 2.5 version we need the following configuration:
http_port 8080
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

in squid 2.6 version the following command is enough:
http_port 8080 transparent

and the other commands are not recognized.

Thanks,
Alessio

Re: Mikrotik with external proxy

Posted: Wed Jan 23, 2008 1:09 pm
by normis
so now it works?

Re: Mikrotik with external proxy

Posted: Wed Jan 23, 2008 10:43 pm
by alessio
Hello Normis,
I confirm, now it's working and I can log every connection made everywhere in the network.

To optimize the network, instead of setting the nat rule on every Mikrotik router we set it just on the firewall of all our network.

Regards,
Alessio

Re: Mikrotik with external proxy

Posted: Sat Mar 01, 2008 2:56 pm
by alex998r
Hi Alessio, I am interested in your setup to track all sites. Please can you draw your setup here or explain in more depth your scenario?
Ciao
Alessandro - Roma
p.s if you want you can send a pm alex998r at tiscali.it

Re: Mikrotik with external proxy

Posted: Sun Mar 02, 2008 2:13 pm
by zerocool86
here interested too... daloia@mobida.it

Francesco

Re: Mikrotik with external proxy

Posted: Sat Mar 22, 2008 10:23 pm
by onowojemma
Hi Alessio,
i enjoy reading ur post pls can i have a simple diagram of how it look like and the needed config on ur squid box.
better still u could mail it to my mailbox onowojemma[at]yahoo.com.
Thanks for the nice post

Re: Mikrotik with external proxy

Posted: Tue Apr 17, 2018 10:28 pm
by Abidemi
I also need the working squid config diagram pls
kolly4weall@yahoo.com
Thanks

Re: Mikrotik with external proxy

Posted: Mon Jun 18, 2018 4:38 am
by bluewater
i also need your config too. Can u send me pls
lehuutrung1991@gmail.com Thks