i use squid 2.7 and i can't show my user in squid log i use hotspot all log in squid is src ip pls help
my network
router board pcc (192.168.4.1)
|
|
squid 192.168.10.1
|
|
mikrotik (hotspot) 10.0.0.1
|
|
users
This is usually an issue with NAT. Try not to use a SRC-NAT rule on the 10.0.0.1 router. If you do, then your address will be masqueraded and you'll see the users as 10.0.0.1 and not their own IPs.i use squid 2.7 and i can't show my user in squid log i use hotspot all log in squid is src ip pls help
my network
router board pcc (192.168.4.1)
|
|
squid 192.168.10.1
|
|
mikrotik (hotspot) 10.0.0.1
|
|
users
and you show all ips in your squid as 192.168.10.2, you have a nat somewhere in there.ethernet in mikroitk to squid 192.168.10.2
add chain=srcnat action=masquerade src-address=10.0.0.0/20
when disable it in nat i loss internet and i cant access squid with 192.168.10.1 ipAnRkey is right. If you have this:and you show all ips in your squid as 192.168.10.2, you have a nat somewhere in there.ethernet in mikroitk to squid 192.168.10.2
edit: It is probably the hotspot masquerade. When you installed the hotspot, did you use "setup"? When the prompt "Masquerade network : yes" appeared, did you change that to "no"? If not it puts this in "/ip firewall nat":That would cause your problem. Disable that rule.Code: Select alladd chain=srcnat action=masquerade src-address=10.0.0.0/20
Then you need a masquerade with out-interface- WAN. .
/ip firewall nat
add chain=srcnat action=masquerade out-interface=ether1
thanks i will try it and tell you what is happened thanks for fast supportIf ether1 is your WAN interface (internet), then this is the masquerade rule you should have.With this rule, you should be able to access the internet and the ips of your hotspot clients should show correctly in the squid server.Code: Select all/ip firewall nat add chain=srcnat action=masquerade out-interface=ether1
route add -net 172.16.0.0 netmask 255.255.0.0 gw 192.168.2.1 dev eth0
/ip fi nat add action=masquerade chain=srcnat disabled=no out-interface=WAN
/ip fi nat ex
/ip fi man ex
/ip route ex