ºìÁªLinuxÃÅ»§
Linux°ïÖú

ÇóÖúsquid µ¥Íø¿¨ ͸Ã÷´úÀí£¨ÄÚÍø»º´æ·þÎñÆ÷£©

·¢²¼Ê±¼ä:2013-04-27 23:35:29À´Ô´:ºìÁª×÷Õß:cyb322
ÇóÖúsquid µ¥Íø¿¨ ͸Ã÷´úÀí£¨ÄÚÍø»º´æ·þÎñÆ÷£©
ÂÛ̳ÀïµÄ½ÌÎÒ»ù±¾¿´¹ýÁË£¡²»¹ý¶¼Ã»Óа²×°³É¹¦¡£
ÔÚ°Ù¶ÈÀïÒ²ÕÒÁËN¸ö½Ì³Ì£¬Ò²Ò»Ñù²»³É¹¦£¡
°²×°»·¾³£º
Centos 6.0
Ö±½Ó yum -y install squid* °²×°µÄsquid (°²×°ÏÂÀ´µÄÊÇ3.1.10)
ÄÚÍøIP¶ÎÊÇ¡¡192.168.1.0/24 dnsÊÇ£ºÁªÍ¨µÄ£º120.80.88.88 ÄÚÍø·ÓɵÄÍø¹ØÊÇ 192.168.1.254
squid·þÎñÆ÷µÄIPÊÇ 192.168.1.100

squid µÄ¹æÔòÈçÏ£¨Ö»×öÁ˼òµ¥ÅäÖã©
http_port 3128 transparent
visible_hostname 192.168.1.100
acl innet src 192.168.1.0/24
http_access allow innet
http_access deny all

iptables ÅäÖÃÈçÏÂ
iptables -t nat -A PREROUTING -s 192.168.1.0/24 -p tcp --dport 80 -j REDIRECT --to 3128


Çó´óÉñÖ¸µã£¡£¡£¡
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 1 ÌõÆÀÂÛ

  1. jason.bouren ÓÚ 2013-04-28 00:48:51·¢±í:

    ·þÎñÖØÆôÁËÂð