所以我开始了使用思科ASA 5520(9.1(5))的Squid 3.3.8的可怕冒险。 我认为问题是stream量到达了squid盒子,但是它不是到达实际的守护进程或者它没有发送(我认为它没有进入守护进程)
ASA sh wccp
Global WCCP information: Router information: Router Identifier: 192.168.1.1 Protocol Version: 2.0 Service Identifier: web-cache Number of Cache Engines: 1 Number of routers: 1 Total Packets Redirected: 1049 Redirect access-list: wccp-traffic Total Connections Denied Redirect: 0 Total Packets Unassigned: 1 Group access-list: wccp-servers Total Messages Denied to Group: 1 Total Authentication failures: 0 Total Bypassed Packets Received: 0
我确信ASA正在redirectstream量,因为每次启用它时,redirect总数据包都会上升。
我遵循这个指南: http : //wiki.squid-cache.org/ConfigExamples/Intercept/CiscoAsaWccp2来设置鱿鱼的接口。 由于它来自鱿鱼我希望它可以开箱即用,但显然不是。
所以我input了所有的命令:
modprobe ip_gre ip tunnel add wccp0 mode gre remote 192.168.1.1 local 10.10.1.63 dev eth0 ifconfig wccp0 10.10.1.63 netmask 255.255.255.255 up echo 0 >/proc/sys/net/ipv4/conf/wccp0/rp_filter echo 0 >/proc/sys/net/ipv4/conf/eth0/rp_filter echo 1 >/proc/sys/net/ipv4/ip_forward iptables -t nat -A PREROUTING -i wccp0 -p tcp --dport 80 -j REDIRECT --to-port 3129 iptables -t nat -A POSTROUTING -j MASQUERADE
所以这里是我疯狂的debugging技能发挥的地方。 我知道我只有redirectHTTPstream量,所以我去了homedepot.com,因为我新来的,他们不支持ssl。
Global WCCP information: Router information: Router Identifier: 192.168.1.1 Protocol Version: 2.0 Service Identifier: web-cache Number of Cache Engines: 1 Number of routers: 1 Total Packets Redirected: 1182 Redirect access-list: wccp-traffic Total Connections Denied Redirect: 0 Total Packets Unassigned: 1 Group access-list: wccp-servers Total Messages Denied to Group: 1 Total Authentication failures: 0 Total Bypassed Packets Received: 0
和田! 我的数据包redirect了。 所以我知道这些数据包正在冲击ASA,然后ASA将它们redirect到了鱿鱼箱。
接下来我让tcpdump运行在squidbox上,而我试图加载homedepot.com。 我剪下无用的东西,把下面的相关信息
04:03:35.448210 IP 192.168.1.1 > 10.10.1.63: GREv0, length 60: gre-proto-0x883e
所以这个告诉我这个包正在打鱿鱼盒。
我也在wccp0接口上做了一些debugging。
之前:
wccp0 Link encap:UNSPEC HWaddr XXX inet addr:10.10.1.63 PtP:10.10.1.63 Mask:255.255.255.255 inet6 addr: fe80::5efe:a0a:13f/64 Scope:Link UP POINTOPOINT RUNNING NOARP MTU:1476 Metric:1 RX packets:159 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8592 (8.5 KB) TX bytes:180 (180.0 B)
后:
wccp0 Link encap:UNSPEC HWaddr XXX inet addr:10.10.1.63 PtP:10.10.1.63 Mask:255.255.255.255 inet6 addr: fe80::5efe:a0a:13f/64 Scope:Link UP POINTOPOINT RUNNING NOARP MTU:1476 Metric:1 RX packets:164 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8848 (8.8 KB) TX bytes:180 (180.0 B)
它不传输任何数据包,所以我认为这不是鱿鱼守护进程(access.log不显示任何东西)
Squidconfiguration:
http_access allow all http_port 3129 intercept wccp2_router 10.10.1.1 wccp2_forwarding_method gre wccp2_return_method gre wccp2_service standard 0
任何帮助深表感谢!!! <33