paket 1

Langkah-Langkah Konfigurasi Debian
# nano /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.100.17
netmask 255.255.255.192
network 192.168.100.0
broadcast 192.168.100.63
ctrl x lalu y enter
# etc/init.d/networking restart
# nano /etc/sysctl.conf
# iptables -t nat -A POSTROUTING -s 192.168.100.0/26 -j MASQUERADE
# iptables -nL
# nano /etc/rc.local
iptables -t nat -A POSTROUTING -s 192.168.100.0/26 -j MASQUERADE
Cek di Client
# apt-get install bind9
# cd /etc/bind
# nano named.conf
zone “smkn12.sch.id” {
type master;
file “/etc/bind/db.smkn12”;
};
zone “facebook.com” {
type master;
file “/etc/bind/db.facebook”;
};
zone “youtube.com” {
type master;
file “/etc/bind/db.youtube”;
};
zone “google.com” {
type master;
file “/etc/bind/db.google”;
};
zone “100.168.192.in-addr.arpa” {
type master;
file “/etc/bind/db.ip”;
};
ctrl x lalu y enter
# cp db.local db.smkn12
# cp db.127 db.ip
# nano db.smkn12
SOA     smkn12.sch.id root smkn12.sch.id
@    NS    smkn12.sch.id
www    A    192.168.100.17
ctrl x+y enter
# cp db.smkn12 db.facebook
# cp db.smkn12 db.youtube
# cp db.smkn12 db.google
# nano db.facebook
# nano db.youtube
# nano db.google
# nano db.ip
SOA    smkn12.sch.id root smkn12.sch.id
@    NS     smkn12.sch.id
17    PTR    www.smkn12.sch.id.
17    PTR    www.facebook.com.
17    PTR    www.youtube.com.
17    PTR    www.google.com.
CTRL X+Y ENTER
# nano /etc/resolv.conf
search smkn12.sch.id
nameserver 192.168.100.17
# /etc/init.d/bind9 restart
# nslookup http://www.smkn12.sch.id
# nslookup 192.168.100.17
# apt-get install apache2 php5
# cd /etc/apache2/sites-available
# cp default smkn12
# nano smkn12
ServerAdmin ririn@smkn12.sch.id
ServerName http://www.smkn12.sch.id
ServerAlias smkn12.sch.id
DocumentRoot /home/ririn/public_html
<Directory /home/ririn/public_html/>
# cp smkn12 faebook
# cp smkn12 youtube
# cp smkn12 google
# nano facebook
ServerAdmin ririn@facebook.com
ServerName http://www.facebook.com
ServerAlias facebook.com
DocumentRoot /home/ririn/public_html/facebook
<Directory /home/ririn/public_html/facebook/>
# nano youtube
ServerAdmin ririn@youtube.com
ServerName http://www.youtube.com
ServerAlias youtube.com
DocumentRoot /home/ririn/public_html/youtube
<Directory /home/ririn/public_html/youtube/>
# nano google
ServerAdmin ririn@google.com
ServerName http://www.google.com
ServerAlias google.com
DocumentRoot /home/ririn/public_html/google
<Directory /home/ririn/public_html/google/>
# mkdir /home/ririn/public_html
# mkdir /home/ririn/public_html/facebook
# mkdir /home/ririn/public_html/youtube
# mkdir /home/ririn/public_html/google
# a2dissite default
# a2ensite smkn12
# a2ensite facebook
# a2ensite youtube
# a2ensite google
# /etc/init.d/apache2 restart
# apt-get install squid
# nano /etc/squid/squid.conf
ctrl w  : http_port 3128 tambahkan transparent
ctrl w  : INSERT YOUR OWN
acl blok dstdomain “/etc/squid/blok”
acl lan src 192.168.100.0/26
http_access deny blok
http_access allow lan
visible_hostname http://www.smkn12.sch.id
cache_mgr ririn@smkn12.sch.id
#http_access deny all  tambah #
# nano /etc/squid/blok
.facebook.com
.youtube.com
# nano /etc/rc.local
iptables -t nat -A PREROUTING -p tcp -s 192.168.100.0/26 –dport 80 -j REDIRECT
–to-port 3128
# /etc/init.d/squid restart
# reboot