Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5283817
  • 博文数量: 1144
  • 博客积分: 11974
  • 博客等级: 上将
  • 技术积分: 12312
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-13 20:06
文章存档

2017年(2)

2016年(14)

2015年(10)

2014年(28)

2013年(23)

2012年(29)

2011年(53)

2010年(86)

2009年(83)

2008年(43)

2007年(153)

2006年(575)

2005年(45)

分类: LINUX

2006-04-16 17:21:37

eth0:218.247.50.23,外网口 

eth1:192.168.0.1/24,内网口
 
squid.conf 部分
httpd_accel_port 80
httpd_accel_host virtual
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
acl allow_lan src 192.168.0.0/24
 
cache_access_log
cache_store_log
cache_log
cache_dir ufs /var/spool/squid 100 16 256
 
cache_effective_user squid
cache_effective_group squid
 
iptables 部份
 
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j SNAT --to 218.247.50.23
iptables -t nat -A PREROUTING -s 192.168.0.0/24 -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
 
echo 1 > /proc/sys/net/ipv4/ip_forward
今天所做的实验哦 
阅读(2146) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-04-02 06:06:52

经测试这种透明模块关掉squid也是可以直接上网。不是真正的透明代理,控制不到!