You are on page 1of 2

cd /etc/network/

cp interfaces interfaces.asli
pico interfaces
#the primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameserver 192.168.1.1
#IP LAN
auto eth1
iface eth0 inet static
address 192.168.100.1
netmask 255.255.255.0
network 192.168.100.0
broadcast 192.168.100.255
ctrl x Y enter
/etc/init.d/networking restart
ifconfig eth0
ifconfig eth1
nano/etc/sysctl.conf

ctrl w

#net.ipv4.ip_forward=1 (hapus tanda #pagar)

pico /etc/rc.local

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


iptables -t nat -A POSTROUTING -j MASQUERADE
exit 0

# apt-get install squid


masukan lagi iso debian setelah perintah di atas
lalu
cd /etc/squid
cp squid.conf squid.conf.asli
pico squid.conf
ctrl w
cari
http port 3128 menjadi http port 3128 transparent
acl connect tulis perintah di bawah 'acl connect"
acl blokir dstdomain "/etc/squid/blokir.txt"
http access deny all > http access deny blokir
http access allow localnet >http access allow all
visible_hostname visible_hostname www.smkvocduta.sch.id
cache_mgr webmaster > cache_mgr widya_puspa@smkvocduta.sch.id
cache_mem 4 mb > cache_mem 32 mb
ctrl x y enter

nano blokir.txt
.google.com
.yahoo.com
ctrl x y enter
keluarkan iso dari virtual box
/etc/init.d/squid restart
/etc/init.d/squid status

You might also like