
本文共 1995 字,大约阅读时间需要 6 分钟。
���������������������������������
1. ������������������
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
2. Squid���������������������
2.1 ������squid������
������ECS������������������������������
[root@ECS58979490c134 ~]# yum -y install squid
������������������������������������������/etc/squid/squid.conf
���
2.2 ������������������
������������������/etc/squid/squid.conf
���
[root@ECS58979490c134 ~]# vim /etc/squid/squid.conf
���������������������
http_port 3128cache_mem 8MBcache_dir ufs /var/spool/squid 100 16 256access_log /var/log/squid/access.log squidvisible_hostname proxy.eflycloud.com
���������������������������������������
2.3 ������������������
������squid���������
[root@ECS58979490c134 ~]# service squid start
���������������������
[root@ECS58979490c134 ~]# netstat -anptu | grep :3128
3. ���������������������
������������������������������������������������������
������ URL: proxy.eflycloud.com:3128
������������������������������������������������������
4. ������������������
���������������������������������������
[root@ECS58979490c134 ~]# vim /etc/squid/squid.confhttp_port 3128 transparent
������������������
[root@ECS58979490c134 ~]# service squid restart
5. ���������������������
���������������������������������
[root@ECS58979490c134 ~]# iptables -t nat -A PREROUTING -i eth0 -s 192.168.1.0/24 -p tcp --dport 80 -j REDIRECT --to-ports 3128
���������������������������
[root@ECS58979490c134 ~]# service iptables save[root@ECS58979490c134 ~]# reboot
6. ���������������
������������������������ -������������������http://google.com
��������������������������������� -������������������������
[root@ECS58979490c134 ~]# iptables -t nat -L
���������������������������
������������������������������������������������������������������������������������������������������������������
发表评论
最新留言
关于作者
