Konfigurasi Blokir Situs Seperti Google Pada Router di Linux Ubuntu dan Debian

0 komentar
Konfigurasi Router & Proxy Server Debian

1. Konfigurasi IP Address
#nano /etc/network/interface
auto eth0
iface eth0 inet static
 address 192.168.10.100
 netmask 255.255.255.0
 network 192.168.10.0
 broadcast 192.168.10.255
 gateway 192.168.10.1
 dns-nameservers 8.8.8.8

auto eth1
iface eth1 inet static
 address 192.168.100.1
 netmask 255.255.255.192
 network 192.168.100.0
 broadcast 192.168.100.63

#/etc/init.d/networking start
#ifconfig
#reboot

2. Konfigurasi Roting NAT
#nano /etc/rc.local
masukan konfigurasi berikut ini sebelum exit 0

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -s 192.168.100.0/26 -p tcp --dport 80 -j REDIRECT --to-port 3128

#/etc/init.d/rc.local start
#reboot

#nano /etc/sysctl.conf
hilangkan tanda pagar pada konfigurasi berikut ini

net.ipv4.ip_forward=1


3. Konfigurasi Proxy Server

#apt-cdrom add
#apt-get install squid3
#nano /etc/squid3/squid.conf

http_port 3128 transparent

visible_hostname namapeserta@sekolah.sch.id
cache_mgr www.sekolah.sch.id

acl lan src 192.168.100.0/26
acl key url_regex -i "/etc/squid/key"

http_access allow lan
http_access allow all
http_access deny key

#nano /etc/squid/key
www.google.com
www.yahoo.com
.google.com
.yahoo.com

#squid3 -z
#/etc/init.d/squid3/restart

Leave a Reply

Pramuka Smanab

Labels