Chinaunix首页 | 论坛 | 博客
  • 博客访问: 238657
  • 博文数量: 62
  • 博客积分: 2540
  • 博客等级: 少校
  • 技术积分: 607
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-05 10:47
文章分类

全部博文(62)

文章存档

2015年(3)

2013年(9)

2010年(10)

2009年(7)

2008年(7)

2007年(22)

2006年(3)

2005年(1)

我的朋友

分类: BSD

2007-01-04 15:02:39

这是今天做好的CACHE,下面是一些基本的步骤,但是配置WCCPV2时不成功.并没有对配置进行优化
BSD内核编译
######ipf##########
options         IPFIREWALL
options         IPFIREWALL_VERBOSE
options         IPFIREWALL_DEFAULT_TO_ACCEPT
options         IPFIREWALL_VERBOSE_LIMIT=5
options         IPDIVERT
device          gre
options         IPFIREWALL_FORWARD
options         MAXFILES=24648
options         NMBCLUSTERS=51200
要激活IP包转发,在/etc/sysctl.conf中增加如下行:
net.inet.ip.forwarding=1
创建GRE口
% ifconfig gre0 create
% ifconfig gre0 netmask 255.255.255.255 up
% ifconfig gre0 tunnel
% route delete
 
配置CACHE服务器的代理防火墙
ipfw -q -f flush
ipfw add allow tcp from me to any out
ipfw add allow tcp from any 80 to any out
ipfw add fwd 127.0.0.1,3128 tcp from any to any 80 in
ipfw add allow tcp from any 80 to 222.216.x.158 in
ipfw add allow gre from 222.216.x.x to 222.216.x.158
路由器上的配置
interface GigabitEthernet0/1(电信口)
 ip wccp web-cache redirect out
interface Vlan900(内网口)
 ip address 222.216.x.x 255.255.255.240
 no ip redirects
 no ip unreachables
 no ip proxy-arp
 ip wccp web-cache redirect in
 ip route-cache flow
配置启用WCCP协议
ip wccp web-cache redirect-list 151(全局启用WCCP)
ip wccp version 1
ip cef
access-list 151 表示什么IP可以通过WCCP代理

squid 配置
编译选项
configure options:  --enable-ipf-transparent --enable-htcp --disable-internal-dns --enable-large-cache-files --enable-cache-digests --enable-removal-policies --disable-ident-lookups --enable-storeio=aufs,ufs --with-aufs-threads=160 --enable-delay-pools --enable-poll --enable-underscores
启用透明代理
httpd_accel_host virtual
httpd_accel_port 80

httpd_accel_with_proxy on
httpd_accel_uses_host_header on
wccp_router 222.216.x.254(配置wccp路由器)
阅读(1446) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~