I want to use external squid server in transparent mode. There are many ACL want to create based on IP of the logged users. At present I could not get the log of all client users with their IPs, but just getting WAN IP of Mikrotik router only in the access log. Hows is possible to get all IPs of the logged users ?
/ip address print detail
Flags: X - disabled, I - invalid, D - dynamic
0 address=192.168.15.100/24 network=192.168.15.0 interface=ether2wan actual-interface=ether2wan
1 address=10.5.0.1/16 network=10.5.0.0 interface=ether3clients actual-interface=ether3clients
/ip route print detail
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
0 A S dst-address=0.0.0.0/0 gateway=192.168.15.50 gateway-status=192.168.15.50 reachable ether2wan distance=1 scope=30 target-scope=10
1 ADC dst-address=10.5.0.0/16 pref-src=10.5.0.1 gateway=ether3clients gateway-status=ether3clients reachable distance=0 scope=10
2 ADC dst-address=192.168.15.0/24 pref-src=192.168.15.100 gateway=ether2wan gateway-status=ether2wan reachable distance=0 scope=10
/interface print detail
Flags: D - dynamic, X - disabled, R - running, S - slave
0 name=“ether1” type=“ether” mtu=1500 l2mtu=1526 max-l2mtu=1526
1 R name=“ether2wan” type=“ether” mtu=1500 l2mtu=1522 max-l2mtu=1522
2 R name=“ether3clients” type=“ether” mtu=1500 l2mtu=1522 max-l2mtu=1522
One way to get user ip address in squid log is to mark HTTP traffic and route it to squid. on squid box, you must create a route pointing to MT, so that squid can directly ping/see the user behind mikrotik.
Hope this will help you.
‘Howto Redirect HTTP traffic to SQUID with Original Source Client IP’
SQUID PROXY HARDWARE = SQUID v2.7 on UBUNTU Karmic Koala v9.10
Xeon 3.6Ghz Dual / 4 GB Ram / WD 500 GB x3 SATA HDD (2 HDD reserved for Cache), This server acts as a proxy + Gateway machine for the Mikrotik, It also do URL Filtering blocking ads, it also have ZPH enabled so content available in squid cache should be downloaded at full speed (without package limitation) at user end.