Squid and iptables Basic

August 16, 2007

Ada banyak cara untuk menghubungkan komputer klien ke internet,
Bisa pake iptables (Untuk Masquerade atau untuk transparent proxy)

Ini untuk masquerade …

#iptables -t nat -F

#iptables -t nat -A POSTROUTING -s 192.168.29.133/255.255.255.0
-o eth1 -j MASQUERADE
#iptables-save > /etc/sysconfig/iptables

Klu untuk Transparent proxy ..
#iptables -t nat -A PREROUTING -p tcp -m tcp –dport 80 -j
REDIRECT –to-ports 3128

echo "1" > /proc/sys/net/ipv4/ip_forward

service iptables save

# vi /etc/squid/squid.conf (Lokasi file Konfigurasi Squid)
/* Tambah Line */
httpd_accel_host [iphost]
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_user_host_header on

/* Tambah lagi di bagian acl nya */

acl client src 192.168.29.133
http_access allow client

Comments »

The URI to TrackBack this entry is: http://cahpct.blogsome.com/2007/08/16/squid-and-iptables-basic/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.