免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1189 | 回复: 1
打印 上一主题 下一主题

[网络管理] 简单问题等待点拨,可以代理,不能够透明 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-04-26 17:32 |只看该作者 |倒序浏览
可以实现squid代理,但是不能够透明,也就是说上网客户端一定要设置代理服务器:192.168.11.2,端口:3128.去掉之后便不能代理,不知道问题出在什么地方.敬请点拨

Eth0: 172.18.15.252  对外网卡
Eth1:192.168.11.2   对内网卡

iptables 部分写在rc.local中:
Modprobe ip_tables
Modprobe iptable_nat
Modprobe ip_nat_ftp
Modprobe ip_conntrack
Modprobe ip_conntrack_ftp
Modprobe iptables_filter

Echo “1” >;/proc/sys/net/ipv4/ip_forward
/sbin/iptables –F –t nat

Iptables –t nat –A prerouting –i eth1 –p tcp –s 192.168.11.0/24 –deport 80 –j REDIRECT –to-port 3128

Iptables –t nat –A postrouting –s 192.168.11.2/24 –o eth0 –j SNAT –to 172.18.15.252

squid.conf内容:
http_port 3128
httpd_accel_port 80
httpd_accel_post virtural
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

cache_mem 90 MB
cache_dir ufs /var/spool/squid 2048 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/squid/cache.log
cahe_store_log /var/squid/store.log

acl all src 0.0.0.0/0.0.0.0
http_access allow all

cache_swap_low 95
cache_swap_high 98
maximum_object_size 4096 KB
cache_effective_user squid
cache_effecitve_group squid
cache_mgr woxe@sohu.com
dns_nameservers 172.18.1.5

论坛徽章:
0
2 [报告]
发表于 2005-04-26 17:40 |只看该作者

简单问题等待点拨,可以代理,不能够透明

nat表在设置新规则之前没清除掉之前的内容
filter表的状况不详
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP