大纲鱿鱼服务器 – 用pfredirectstream量

我的目标是什么:知道员工在互联网上看什么(页面,多长时间等等;没有caching)。

我所做的:在openBSD上安装squid

问题:我看到整个stream量(tcpdump),但我不能将它redirect到鱿鱼

我如何连接它:

[ internet ] | [ switch with port mirroring ] => [ squid server ] | [ LAN ] 

我的鱿鱼服务器有两个网卡:sis0 IP地址10.0.0.100(pipe理连接)和rl0没有IP地址和promisc模式(没有桥;整个stream量去那个接口)。

我的pf.conf:

 pass # establish keep-state block in on ! lo0 proto tcp to port 6000:6010 pass in on rl0 proto tcp from any to any port {80 443 3128 8080} rdr-to 10.2.0.247 port 3128 

我在/var/squid/log/access.log中没有任何内容。 nc -l 3128什么都不打印。

我的squid.conf:

 cat /etc/squid/squid.conf | grep -v ^$ | grep -v ^# acl all src all acl manager proto cache_object acl localhost src 127.0.0.1/32 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 acl localnet src 10.0.0.0/24 # RFC1918 possible internal network acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl Safe_ports port 70 # gopher acl Safe_ports port 210 # wais acl Safe_ports port 1025-65535 # unregistered ports acl Safe_ports port 280 # http-mgmt acl Safe_ports port 488 # gss-http acl Safe_ports port 591 # filemaker acl Safe_ports port 777 # multiling http acl CONNECT method CONNECT http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow localnet http_access deny all icp_access allow localnet icp_access deny all http_port 10.0.0.100:3128 hierarchy_stoplist cgi-bin ? cache_dir null /tmp maximum_object_size 20480 KB access_log /var/squid/logs/access.log squid refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern . 0 20% 4320 acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9] upgrade_http0.9 deny shoutcast acl apache rep_header Server ^Apache broken_vary_encoding allow apache coredump_dir /var/squid/cache 

你在squid.conf中的localnet是错误的: acl localnet src 10.0.0.0/24

必须是acl localnet src 10.2.0.0/24