CentOS系统中squid透明代理+iptables防火墙详细配置
发布时间:2021-10-21 00:01:01浏览次数:
CentOS
系统中
squid
透明代理
+iptables
防火墙详细配置
2015-03-02 16:12:04|
分类:
http
|
标签:
|
举报
|
字号
大中小
订阅
看到很多人都在不停地问
iptables+squid
做透明代理的问题,鄙人不才,斗胆在此做统一解答。如有任何
纰漏还望各位批评指教。
===================================
看到很多人都在不停地问
iptables+squid
做透明代理的问题,鄙人不才,斗胆在此做统一解答。如有任何
纰漏还望各位批评指教。
=====================================================================
相关资源:
man.chinaunix.net
,左下角有
iptables
的
man
,仔细看看。
系统:
CentOS4.2
,三块网卡,两个内网,一个外网。双至强,
2GHz
,
2GB
内存。服务器主要开了
squid
,
sshd
,
其他的一律闭掉了。
eth0
:
192.168.100.1
eth1
:
192.168.168.12
eth2
:
A.B.C.D ――
外网地址
=====================================================================
squid
设定可以根据自己的情况来,我们假设其端口为
3128
,在三块网卡上都有监听(不要绑定某一个
IP
或网卡)。
/etc/squid/squid.conf
http_port 3128
cache_mem 1000 MB
cache_swap_low 90
cache_swap_high 95
cache_dirufs /opt/cache/squid 8000 16 256
cache_access_log /var/log/squid/access.log
cache_store_log /var/log/squid/store.log
dns_nameservers 210.77.192.88
maximum_object_size 409600 KB
maximum_object_size_in_memory 64000 KB