Hotspot + Squid3 = No real user name/IP on Sarg

Guys,

I made a dstn to point any port 80 of my hotspot (10.0.0.0) to my squid3 on Ubuntu server (192.168.20.100).

On the sarg report, I only see the IP 192.168.20.1 , so al hotspot users are using the proxy but on the report it doesnt understand the real name/user ip, only the “caller” (gateway of my linux).

Is there some way to log the user or the real ip on squid ? is this a Sarg setup or Squid ?

cheers

In your default masquerade rule, select WAN nic in OUT Interface (So it may not NAT all request going to squid interface)

At squid, you must create a route so squid should know about the user subnet. It also depends on how your squid is configured. For example if it have two interface , 1 for lan (mt) and 2nd for internet, then you should be creating reverse route as showed in the article below. But if you have only one interface on squid box connected to mikrotik with default gateway pointing to mikrotik, then you wont be needing any route specifically. Read the article it have some explanation.

http://aacable.wordpress.com/2011/07/21/mikrotik-howto-redirect-http-traffic-to-squid-with-original-source-client-ip/

Thanks Aacable!

I will try this 2night!

I only concern is that I have a masquarete for the OUT on the Wan1 and looks like hotspot adds another Nat for it, so I guess I will have to disable this last one and use your tutorial, correct ?

Do you know a good pdf with some explanation of the rules that Hotspot creates ? I tried few time to understands but looks like a little bit complicated.

cheers

you can also edit previous nat rule too.