Mikrotik with external proxy

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

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.

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

so now it works?

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

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

here interested too… daloia@mobida.it

Francesco

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

I also need the working squid config diagram pls
kolly4weall@yahoo.com
Thanks

i also need your config too. Can u send me pls
lehuutrung1991@gmail.com Thks