Squid + iptables搭建透明代理
来源:互联网 发布:mysql 分组排序 编辑:程序博客网 时间:2024/05/16 12:47
到http://www.squid-cache.org/Versions/ 下载最新版本的squid软件
安装squid需要开启透明代理转发
./configure --prefix=/usr/local/squid --enable-snmp --enable-arp-acl --enable-linux-netfilter --enable-arp-acl --enable-gnuregex --enable-cahce-digests --enable-underscore
squid.conf文件配置:
# vi /etc/squid/squid.conf
httpd_accel_host virtual
http_port 3128
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
cache_mem 110 MB
cache_swap_low 90
cache_swap_high 95
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid 3000 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
acl net src 192.168.1.0/24
acl all src 0.0.0.0/0
http_access allow net
http_access deny all
创建squid log目录
mkdir /var/spool/squid
mkdir /var/log/squid
修改目录权限:
chmod 777 /var/spool/squid
chmod 777 /var/log/squid
Setup Iptables
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-ports 3128
echo 1 > /proc/sys/net/ipv4/ip_forward
我使用squid 2.6版本的测试中发现所有包含httpd_accel的语句购无法启用,系统提示未知的httpd_accel XXXX,但由于多增加了一个http_port 3128所以squid可以正常运行。
- Squid + iptables搭建透明代理
- Squid + iptables搭建透明代理
- squid 2.6 + iptables 透明代理设置
- iptables+squid透明代理+防火墙终极配置
- iptables+squid透明代理+防火墙终极配置
- 透明代理squid+dhcp+iptables=linux
- iptables NAT+squid实现透明代理
- 利用Squid搭建透明代理网关服务器
- Squid代理服务器&&搭建透明代理网关服务器
- squid透明代理纯文本搭建
- 使用squid搭建https透明代理
- 成功使用squid+iptables配置透明代理 (zt)
- linux下代理服务器配置 用squid+iptables实现透明代理
- iptables+NAT+squid 透明代理上网实现方案
- iptables+NAT+squid 透明代理上网实现方案
- iptables限制MACIP绑定上网+Squid 透明代理How to
- 原创 iptables +squid 代理
- iptables +squid 代理
- Linux DNS搭建试验和详细过程
- Matrix Chain Multiplication
- 我的异常网 -异常汇总2009-11-25
- OEM和ODM的区别
- 预编译头文件的使用
- Squid + iptables搭建透明代理
- 阿朱看中国企业信息化发展方向
- Crontab 格式详解
- stl的内存管理
- php读取标准输入的方式
- yum for linux update
- LINUX高级应用之IPTABLES实例分析
- 在linux字符模式下使用proxy
- Perl正则表达式的灵活应用