Ubuntu+Cisco ASA搭建支持WCCP的Squid

首页 → Linux教程

背景:

阅读新闻

Ubuntu+Cisco ASA搭建支持WCCP的Squid

[日期:2010-09-30]来源:Linux社区作者:an6097[字体:]

环境说明

Cisco防火墙地址

inside口:10.10.0.1

outside口:123.*.*.*

DMZ口:172.*.*.*

Cisco核心交换机

总出口10.10.0.2

squid:10.10.0.3

防火墙、交换机、squid通过交换机连接

1.安装Ubuntu

hostname:proxy

ip:10.6.1.3 gateway:10.6.1.2 netmask:255.255.255.0 broadcast:10.6.1.255

2.修改root密码

设置root密码:sudo passwd root

3.取消squid版本信息

/src/errorpage.c 文件在以下地方修改

} error_hard_text[] = {

{

ERR_SQUID_SIGNATURE,

“\n<BR clear=\”all\”>\n”

“<HR noshade size=\”1px\”>\n”

“<ADDRESS>\n”

“Generated %T by %h (%s)\n” #将%s修改即可,%t为当前时间

“</ADDRESS>\n” #%h 为主机名称

“</BODY></HTML>\n”

}

4.编译:

apt-get source squid

./configure –prefix=/usr/ –localstatedir=/var/squid –sysconfdir=/etc/squid –enable-cache-digests –enable-delay-pools –enable-forward-log –enable-async-io –enable-dlmalloc –enable-arp-acl –enable-linux-netfilter –disable-hostname-checks –enable-underscores –enable-auth –enable-icmp –enable-htcp

安装后文件位置:

/usr/squid 主目录

/usr/ sbin/squid 执行文件

/etc/squid/squid.conf 配置文件

/var/squid/logs 日志

/var/squid/cache 自己建立的cache

5.配置squid

mkdir /var/ squid/cache #给squid创建 cache目录

chown –R proxy:proxy /var/squid #更改/var/squid目录的所有者为proxy

/usr /sbin/squid –z #生成交换文件目录

squid 启动squid

修改配置文件:

cd /etc/squid/

rm squid.conf

vi squid.conf

将下边的内容复制到squid.conf里

access_log /var/squid/logs/access.log squid

cache_store_log /var/squid/logs/store.log

cache_log /var/squid/logs/cache.log

acl all src 0.0.0.0/0.0.0.0

acl internal dstdomain “/etc/squid/internal.acl“ #定义acl

http_port 3128 transparent

http_access allow all

wccp2_router 10.6.1.1 #指定防火墙的地址wccp2_rebuild_wait onwccp2_forwarding_method 1wccp2_return_method 1wccp2_assignment_method 1wccp2_service standard 0

cache_mem 4096 MB

cache_dir ufs /var/squid/cache 10240 16 256

cache_effective_user proxy

error_directory /usr/share/errors/no

cache_mgr **@*** #设置错误提示页面中管理员的邮件地址

forwarded_for off #不显示客户端私有IP

logfile_rotate 3 #日志轮回,保存轮回几次的日志

memory_pools on #让squid自动分配内存

memory_pools_limit none #不做上限限制

cache_swap_low 85

cache_swap_high 95

no_cache deny internal #对于acl internal中的域名不缓存

0

Ubuntu突然没有声音的解决方法

Linux轻量级系统DSL Linux安装使用详解

相关资讯 Ubuntu教程

图片资讯

本文评论  查看全部评论 (0)

评论声明

最新资讯

本周热门

Linux公社简介 – 广告服务 – 网站地图 – 帮助信息 – 联系我们本站(LinuxIDC)所刊载文章不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。Copyright © 2006-2014 Linux公社 All rights reserved 浙ICP备06018118号

,请打开窗口,让我的灵魂与你的灵魂相拥。

Ubuntu+Cisco ASA搭建支持WCCP的Squid

相关文章:

你感兴趣的文章:

标签云: