-apt-get install squid
Do you want to continue ? “y”
Do you want to continue ? “y”
-cp /etc/squid/squid.conf
/etc/squid.conf.backup
-nano /etc/squid/squid.conf
-(Ctrl + W) ketik » port
3128
http_port 3128 (tambahkan ‘transparent’)
maka hasilnya: http_port 3128 transparent
http_port 3128 (tambahkan ‘transparent’)
maka hasilnya: http_port 3128 transparent
-(Ctrl + W) ketik » acl
connectDibawah tulisan acl CONNECT method CONNECT tambahakan tulisan:
acl larang url_regex –i “/etc/squid/larang.txt”Sehingga hasilnya: acl CONNECT method CONNECT
acl larang url_regex –i “/etc/squid/larang.txt”
acl larang url_regex –i “/etc/squid/larang.txt”Sehingga hasilnya: acl CONNECT method CONNECT
acl larang url_regex –i “/etc/squid/larang.txt”
-(Ctrl + W) ketik » access
deny all
Lalu dibawah tulisan ‘# And finally deny all other access to this proxy’ » http_access deny all ganti dengan http_access deny larang dibawahnya tambahkan juga http_access allow all
maka hasilnya:
# And finally deny all other access to this proxy
http_access deny larang
http_access allow all
Lalu dibawah tulisan ‘# And finally deny all other access to this proxy’ » http_access deny all ganti dengan http_access deny larang dibawahnya tambahkan juga http_access allow all
maka hasilnya:
# And finally deny all other access to this proxy
http_access deny larang
http_access allow all
-(Ctrl + W) ketik »
cache_mgr
pada ‘cache_mgr webmaster’ kata webmaster dihapus dan diganti dengan email kita (misalnya dito.com)
maka hasilnya: cache_mgr dito.com
pada ‘cache_mgr webmaster’ kata webmaster dihapus dan diganti dengan email kita (misalnya dito.com)
maka hasilnya: cache_mgr dito.com
-(Ctrl + W) ketik »
visible_hostname
dibawah ‘# http_suppress_version_string off’ , pada visible_hostname, tambahkan nama website sekolah, misalnya: www.smkn3-buduran.sch.id
maka hasilnya:
# http_suppress_version_string off
visible_hostname www.smkn3-buduran.sch.id
# TAG: visible_hostname
dibawah ‘# http_suppress_version_string off’ , pada visible_hostname, tambahkan nama website sekolah, misalnya: www.smkn3-buduran.sch.id
maka hasilnya:
# http_suppress_version_string off
visible_hostname www.smkn3-buduran.sch.id
# TAG: visible_hostname
-Lalu simpan (Ctrl + X)
Lalu Untuk memblokir situs-situs yang kita inginkan :
- nano
/etc/squid/larang.txt
lalu ketikkan nama situs-situs yang akan diblokir.
contoh:
www.+17.com www.twitter.com
www.facebook.com www.3x.com
Setelah itu kita restart squid dengan cara :
- /etc/init.d/squid restart (bisa juga dengan ‘start’)
Setelah itu kita setting network interfaces dengan cara :
- nano /etc/network/interfaces
address
192.168.12.1
netmask 255.255.255.0
network 192.168.12.0
broadcast 192.168.12.255
network 192.168.12.0
broadcast 192.168.12.255
Setelah itu kita restart network interfaces dengan cara :
- /etc/init.d/networking restart
Setelah
itu buka rc.local lalu edit seperti dibawah ini :
- nano /etc/rc.local
dibawah tulisan # By default this
script does nothing.
tambahkan:echo 1 >
tambahkan:echo 1 >
/proc/sys/net/ipv4/ip_forward
iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
maka otomatis hasilnya:
# By default this script does nothing.
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
Setelah itu kita restart squid dan network dengan cara :
# By default this script does nothing.
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
Setelah itu kita restart squid dan network dengan cara :
- /etc/init.d/squid restart
- /etc/init.d/networking restart
Tidak ada komentar:
Posting Komentar