Transparent proxy in squid 2.6

Posted In Squid - By Tum. On Tuesday, August 28th, 2007 With 0 Comments

การ config transparent proxy ตั้งแต่ squid version 2.6 เป็นต้นไป ได้เปลี่ยนการตั้งค่าใหม่โดยใช้

แทนการตั้งค่าแบบเก่าที่ต้องมี configuration มากมายหลายบรรทัด ตามตัวอย่างด้านล่าง


และให้เพิ่ม REDIRECT rule ของ iptables ด้วย

จากข้างบนจะสามารถ config transparent proxy ได้ตามขั้นตอนด้านล่างดังนี้

แก้ไขไฟล์ /etc/squid/squid.conf โดยให้แก้ไขบรรทัด http_port เป็นดังนี้

จากนั้นให้ restart squid ด้สนคำสั่ง

เซ็ต iptables สำหรับการ redirect การร้องขอใช้งาน port 80 ไปยัง port 3128

หลังจากทำตามขั้นตอนข้างต้นเสร็จแล้วทดสอบการใช้งานได้โดยให้เครื่อง client ชี้ gateway มาที่ squid server ตัวที่ได้ config ไว้

อ่านข้อมูลเพิ่มเติมสำหรับการ Setup squid transparent proxy ให้สามารถใช้ https

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

*