Proxy Transparent Debian 5
auto eth0
Iface eth0 inet static
Address 192.168.0.2
Dns-nameserver 192.168.137.0.2
……………. (anda faham sendiri kelanjutan nya)
…………….
Auto eth1
Iface eth1 inet static
Address 202.134.1.1
Netmask 255.255.255.0
Network 202.134.1.0
Broadcast 202.134.1.255
/etc/init.d/networking restart
iptables -t nat -A POSTROUTING –s 202.134.1.0/24 –j MASQUERADE (IP yang di eksekusi eth1)
echo 1 > /proc/sys/net/ipv4/ip_forward
Penghapusan tanda pagar
pico /etc/sysctl.conf
#net.ipv4.ip_forward=1
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1
#net.ipv4.tcp_sysncookies=1
/etc/init.d/networking restart
apt-get Install squid dhcp3-server
pico /etc/dhcp.conf
(Konfigurasi dhcp nya ya) - terserah sih mau pakai dhcp server atau tidak
/etc/init.d/dhcp3-server restart
pico /etc/squid/squid.conf
Ctrl+w = CONNECT method dan ketikan dibawah nya
acl blocksites dstdom_regex ”/etc/blocksites”
acl lan src 192.168.0.0/24 (ip yang di pakai ip netwok eth0)
http_access deny blocksites
http_access allow lan
http_access allow all
CTRL + W
Dibawah # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
tambahkan 2 scripts dibawah scripts http_access deny all
acl our_networks src 192.168.0.0/24 (ip eth0)
http_access allow our_networks
penghapusan tanda pagar dan edit script seperti yang anda lihat di bawah ini
http_port 3128 transparent
#cache_mem 16 MB
#cache_dir ufs /var/spool/squid 5000 16 256
CTRL + W = cari = cache_mgr kemudian ketikan
#cache_mgr tkj@rija.com
CTRL + W = cari = TAG: hostname_aliases
Di atas scrift TAG: hostname_aliases ketikan
visible_hostname proxy.rija.com
pico /etc/blocksites
www.facebook.com
/etc/init.d/squid restart
iptables -t nat -A POSTROUTING –s 202.134.1.0/24 –j MASQUERADE (eth1)
iptables -t nat -A PREROUTING –p tcp - -dport 80 -j REDIRECT - -to-port 3128
pico /etc/rc.local
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING –s 202.134.1.0/24 –j MASQUERADE
iptables -t nat -A PREROUTING –p tcp - -dport 80 -j REDIRECT - -to-port 3128
/etc/init.d/networking restart
/etc/init.d/squid restart