Wednesday, January 27, 2016
KONFIGURASI ROUTER
KONFIGURASI ROUTER
#nano /etc/network/interfaces
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
dns_namesevers 7.7.7.1
save
#/etc/init.d/networking restart
#nano /etc/rc.local
diatas exit 0 tambah
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 –j MASQUERADE
save
#/etc/init.d/rc.local stop
#/etc/init.d/rc.local start
#iptables –L –t nat
#apt-get install squid squid-common
#nano /etc/squid/squid.conf
ctrl w
http_port 3128
tambahkan :http_port 3128 transparent
ctrl w
icp_port 3
hapus pagar icp_port 3130
ctrl w
cache_mem 8
hapus pagar cache_mem 8 MB
ctrl w
cache_mgr
hapus #
cache_mgr webmaster : email kamu (bonekbrutal86@yahoo.com)
ctrl w
acl all src
dibawah acl to_localhost tambah :
acl user src 192.168.1..0/24
acl domain dstdomain "/etc/squid/block
ctrl w
http_access
dibawah #default
#http_access deny all
tambahin :
http_access deny domain
http_access allow user
save
#nano /etc/rc.local
diatas exit 0 tambah
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
save
#/etc/init.d/rc.local stop
#/etc/init.d/rc.local start
#iptables –L –t nat
#nano /etc/squid/block
Masukan situs yang akan di blok
Contoh:
www.facebook.com
www.youtube.com
save
#squid –z
#/etc/init.d/squid restart
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment