Community discussions

MikroTik App
 
2fast4youbr
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Mon Apr 15, 2013 10:39 pm

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

Tue May 14, 2013 6:17 am

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
 
User avatar
aacable
Member
Member
Posts: 435
Joined: Wed Sep 17, 2008 11:58 am
Location: ISLAMIC Republic of PAKISTAN
Contact:

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

Tue May 14, 2013 7:29 am

# 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 ... client-ip/
 
2fast4youbr
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Mon Apr 15, 2013 10:39 pm

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

Tue May 14, 2013 4:22 pm

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
 
User avatar
aacable
Member
Member
Posts: 435
Joined: Wed Sep 17, 2008 11:58 am
Location: ISLAMIC Republic of PAKISTAN
Contact:

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

Wed May 15, 2013 7:02 am

you can also edit previous nat rule too.

Who is online

Users browsing this forum: johnb175a, scoobyn8 and 47 guests