:~# apt-get install squid32. Setelah selesai install buka konfigurasi squid dengan text editor
:~# nano /etc/squid3/squid.conf
3. Cari kata acl connect dan tambahkan konfigurasi ini dibawahnya. Untuk mencari gunakan Ctrl+W di nano
========================================================================
acl blok url_regex “/etc/squid3/blokir_kata.txt”
acl blokir dstdomain “/etc/squid3/blokir_url.txt”
http_access deny blokir
http_access deny blok
http_access allow all
http_access allow all
========================================================================
Ket :
acl blok url_regex “/etc/squid3/blokir_kata.txt” dan http_access deny blok adalah untuk memblokir kata yang dicari di browser
acl blokir dstdomain “/etc/squid3/squid.conf” dan http_access deny blokir adalah untuk memblokir alamat website
4. Setelah itu, cari kata http_port 3128 dan tambahkan kata transparent di belakangnya
5. Buat file untuk list website yang ingin di blokir
:~# nano /etc/squid3/blokir_url.txtKetik URL yang ingin di blokir, disini saya contohkan website kaskus, dan youtube yang ingin diblokir
Lakukan lagi seperti itu dengan command
:~# nano /etc/squid3/blokir_kata.txtUntuk memblokir kata
6. Setelah selesai reconfigure & restart squid3
squid3 -k reconfigure
/etc/init.d/squid3 restart7. Untuk bisa mengecek di komputer sendiri masuk ke settingan firefox → Klik tab Advanced → klik
tab Network → klik setting → pilih manual proxy configuration → isi http proxy dengan localhost
dan isi port dengan port squid yaitu 3128
Ket:
Itu adalah untuk firefox tapi sepertinya browser yang lain tidak jauh beda
8. Tampilan defaultnya seperti ini
9. Apabila ingin mengganti nama administrator dan kata “by localhost” tambahkan konfigurasi ini dibawah
config yang tadi
========================================================================
cache_mgr diana@smktjs.com
visible_hostname proxy.smktjs.com
========================================================================
Ket:
kata diana@smktjs.com dan proxy.smktjs.com bisa dirubah sesuka hati
10. Setelah mengedit konfigurasi jangan lup reconfigure & restart
Cara Memblokir Web di Ubuntu dengan Squid
~Setting Router
(+) sudo gedit /etc/sysctl.conf
#net/ipv4/ip_forward=1
Menjadi
net/ipv4/ip_forward=1
(+) sudo sysctl –p
(+) sudo iptables –t nat –A POSTROUTING –s 192.168.50.0/24 –d /0 –j MASQUERADE
Simpan perintah iptables pada rc.local
(+) sudo gedit /etc/rc.local
Tambahkan perintah iptables didalamnya ,terus kita simpan
(+) sudo reboot
(+) sudo iptables –L –t nat
~Proxy Server
*Squid
(+) apt-get install squid
Jika ingin meng uninstall (+)apt-get purge squid
(+) sudo gedit /etc/squid/squid.conf
Ada beberapa yang harus di edit :
# http_port 3128
Menjadi
http_port 3128 transparent
Cari Kata Cache_effective
# #Cache_effective_user proxy
Diganti Menjadi :
Cache_effective_user proxy
Tambahkan perintah pada : TAG : cache_effective_group proxy ditulis dibawah default
Cache_effective_group proxy
Cari kata Cache_mem
#Cache_mem 8 mb
Diganti Menjadi :
Cache_mem 16 mb
Cari kata Cache_mgr
#Cache_mgr webmaster
Diganti Menjadi :
Cache_mgr smkmuga@skull.net
Cari kata Cache dir ufs
#cache dir ufs /var/spool/squid 100 16 256
Diganti Menjadi :
Cache_dir ufs /cache 2000 16 256
Cari kata Acl all src Tambahkan perintah :
Acl lan src 192.168.50.0/24
Menjadi :
#Recommended minium configuration :
Acl all src 0.0.0.0/0.0.0.0
Acl manager proto cache_object
Acl lan src 192.168.50.0/24
Acl localhost src 127.0.0.1/255.255.255.255
Acl to_localhost dst 127.0.0.0/8
Cari kata http_access allow ,Tambahkan perintah:
http_access allow lan
menjadi :
http_access allow localhost
http_access allow lan
#and finally deny all other access to this proxy
http_access deny all
Tambahkan perintah pada TAG : visible_hostname
Ditulis dibawah Default
visible_hostname proxy.skull.net
kita simpan semua perintah diatas ,terus kita keluar kembali ke terminal :
· Membuat folder cache dir
(+) sudo mkdir –p /cache
(+) sudo chown proxy.proxy /cache
(+) sudo squid –z
Jika berhasil muncul tulisan
2014/26/07 01:35:29 | creating swap directories
(+) sudo /etc/init.d/squid start
(+) sudo iptables –t nat –A PREROUTING –p tcp –s 192.168.50.0/24 --dport 80 –j DNAT --to-destination 192.168.50.1:3128
Yang berwarna merah ditulis IP Server eth1(komputer sendiri)
Simpan konfigrasi ini pada sudo /etc/rc.local
(+) sudo gedit /etc/squid/squid.conf
Tambahkan perintah ,pada acl connect methode connet tulis dibawahnya
Acl blok url_regex “/etc/squid/blokir_kata”
Acl blokir dstdomain “/etc/squid/blokir_url”
Acl ip-ojo dst “/etc/squid/blokir_ip-ojo”
http_access deny blokir
http_access deny blok
http_access deny ip-ojo
http_access allow all (save)
Lalu kembali ke terminal dan tuliskan perintah :
(+) sudo gedit /etc/squid/blokir_kata
Di isi dengan kata yang tidak boleh di akses
(+) sudo gedit /etc/squid/blokir_url
Di isi dengan alamat web yang tidak boleh di akses
(+) sudo gedit /etc/squid/ip-ojo
Di isi dengan IP address yang tidak boleh di akses
Setelah selesai kita restart Squid dengan perintah
(+) sudo /etc/init.d/restart squid
NB : Pastikan Sebelum melakukan ini, Kita sudah setting IP server (eth1) yang terhubung dengan Komputer Client.
Copy and WIN : hhttp://bit.ly/copynwin
Copy and WIN : hhttp://bit.ly/copynwin
Cara Memblokir Web di Ubuntu dengan Squid
~Setting Router
(+) sudo gedit /etc/sysctl.conf
#net/ipv4/ip_forward=1
Menjadi
net/ipv4/ip_forward=1
(+) sudo sysctl –p
(+) sudo iptables –t nat –A POSTROUTING –s 192.168.50.0/24 –d /0 –j MASQUERADE
Simpan perintah iptables pada rc.local
(+) sudo gedit /etc/rc.local
Tambahkan perintah iptables didalamnya ,terus kita simpan
(+) sudo reboot
(+) sudo iptables –L –t nat
~Proxy Server
*Squid
(+) apt-get install squid
Jika ingin meng uninstall (+)apt-get purge squid
(+) sudo gedit /etc/squid/squid.conf
Ada beberapa yang harus di edit :
# http_port 3128
Menjadi
http_port 3128 transparent
Cari Kata Cache_effective
# #Cache_effective_user proxy
Diganti Menjadi :
Cache_effective_user proxy
Tambahkan perintah pada : TAG : cache_effective_group proxy ditulis dibawah default
Cache_effective_group proxy
Cari kata Cache_mem
#Cache_mem 8 mb
Diganti Menjadi :
Cache_mem 16 mb
Cari kata Cache_mgr
#Cache_mgr webmaster
Diganti Menjadi :
Cache_mgr smkmuga@skull.net
Cari kata Cache dir ufs
#cache dir ufs /var/spool/squid 100 16 256
Diganti Menjadi :
Cache_dir ufs /cache 2000 16 256
Cari kata Acl all src Tambahkan perintah :
Acl lan src 192.168.50.0/24
Menjadi :
#Recommended minium configuration :
Acl all src 0.0.0.0/0.0.0.0
Acl manager proto cache_object
Acl lan src 192.168.50.0/24
Acl localhost src 127.0.0.1/255.255.255.255
Acl to_localhost dst 127.0.0.0/8
Cari kata http_access allow ,Tambahkan perintah:
http_access allow lan
menjadi :
http_access allow localhost
http_access allow lan
#and finally deny all other access to this proxy
http_access deny all
Tambahkan perintah pada TAG : visible_hostname
Ditulis dibawah Default
visible_hostname proxy.skull.net
kita simpan semua perintah diatas ,terus kita keluar kembali ke terminal :
· Membuat folder cache dir
(+) sudo mkdir –p /cache
(+) sudo chown proxy.proxy /cache
(+) sudo squid –z
Jika berhasil muncul tulisan
2014/26/07 01:35:29 | creating swap directories
(+) sudo /etc/init.d/squid start
(+) sudo iptables –t nat –A PREROUTING –p tcp –s 192.168.50.0/24 --dport 80 –j DNAT --to-destination 192.168.50.1:3128
Yang berwarna merah ditulis IP Server eth1(komputer sendiri)
Simpan konfigrasi ini pada sudo /etc/rc.local
(+) sudo gedit /etc/squid/squid.conf
Tambahkan perintah ,pada acl connect methode connet tulis dibawahnya
Acl blok url_regex “/etc/squid/blokir_kata”
Acl blokir dstdomain “/etc/squid/blokir_url”
Acl ip-ojo dst “/etc/squid/blokir_ip-ojo”
http_access deny blokir
http_access deny blok
http_access deny ip-ojo
http_access allow all (save)
Lalu kembali ke terminal dan tuliskan perintah :
(+) sudo gedit /etc/squid/blokir_kata
Di isi dengan kata yang tidak boleh di akses
(+) sudo gedit /etc/squid/blokir_url
Di isi dengan alamat web yang tidak boleh di akses
(+) sudo gedit /etc/squid/ip-ojo
Di isi dengan IP address yang tidak boleh di akses
Setelah selesai kita restart Squid dengan perintah
(+) sudo /etc/init.d/restart squid
NB : Pastikan Sebelum melakukan ini, Kita sudah setting IP server (eth1) yang terhubung dengan Komputer Client.
Copy and WIN : hhttp://bit.ly/copynwin
Copy and WIN : hhttp://bit.ly/copynwin
Cara Memblokir Web di Ubuntu dengan Squid
~Setting Router
(+) sudo gedit /etc/sysctl.conf
#net/ipv4/ip_forward=1
Menjadi
net/ipv4/ip_forward=1
(+) sudo sysctl –p
(+) sudo iptables –t nat –A POSTROUTING –s 192.168.50.0/24 –d /0 –j MASQUERADE
Simpan perintah iptables pada rc.local
(+) sudo gedit /etc/rc.local
Tambahkan perintah iptables didalamnya ,terus kita simpan
(+) sudo reboot
(+) sudo iptables –L –t nat
~Proxy Server
*Squid
(+) apt-get install squid
Jika ingin meng uninstall (+)apt-get purge squid
(+) sudo gedit /etc/squid/squid.conf
Ada beberapa yang harus di edit :
# http_port 3128
Menjadi
http_port 3128 transparent
Cari Kata Cache_effective
# #Cache_effective_user proxy
Diganti Menjadi :
Cache_effective_user proxy
Tambahkan perintah pada : TAG : cache_effective_group proxy ditulis dibawah default
Cache_effective_group proxy
Cari kata Cache_mem
#Cache_mem 8 mb
Diganti Menjadi :
Cache_mem 16 mb
Cari kata Cache_mgr
#Cache_mgr webmaster
Diganti Menjadi :
Cache_mgr smkmuga@skull.net
Cari kata Cache dir ufs
#cache dir ufs /var/spool/squid 100 16 256
Diganti Menjadi :
Cache_dir ufs /cache 2000 16 256
Cari kata Acl all src Tambahkan perintah :
Acl lan src 192.168.50.0/24
Menjadi :
#Recommended minium configuration :
Acl all src 0.0.0.0/0.0.0.0
Acl manager proto cache_object
Acl lan src 192.168.50.0/24
Acl localhost src 127.0.0.1/255.255.255.255
Acl to_localhost dst 127.0.0.0/8
Cari kata http_access allow ,Tambahkan perintah:
http_access allow lan
menjadi :
http_access allow localhost
http_access allow lan
#and finally deny all other access to this proxy
http_access deny all
Tambahkan perintah pada TAG : visible_hostname
Ditulis dibawah Default
visible_hostname proxy.skull.net
kita simpan semua perintah diatas ,terus kita keluar kembali ke terminal :
· Membuat folder cache dir
(+) sudo mkdir –p /cache
(+) sudo chown proxy.proxy /cache
(+) sudo squid –z
Jika berhasil muncul tulisan
2014/26/07 01:35:29 | creating swap directories
(+) sudo /etc/init.d/squid start
(+) sudo iptables –t nat –A PREROUTING –p tcp –s 192.168.50.0/24 --dport 80 –j DNAT --to-destination 192.168.50.1:3128
Yang berwarna merah ditulis IP Server eth1(komputer sendiri)
Simpan konfigrasi ini pada sudo /etc/rc.local
(+) sudo gedit /etc/squid/squid.conf
Tambahkan perintah ,pada acl connect methode connet tulis dibawahnya
Acl blok url_regex “/etc/squid/blokir_kata”
Acl blokir dstdomain “/etc/squid/blokir_url”
Acl ip-ojo dst “/etc/squid/blokir_ip-ojo”
http_access deny blokir
http_access deny blok
http_access deny ip-ojo
http_access allow all (save)
Lalu kembali ke terminal dan tuliskan perintah :
(+) sudo gedit /etc/squid/blokir_kata
Di isi dengan kata yang tidak boleh di akses
(+) sudo gedit /etc/squid/blokir_url
Di isi dengan alamat web yang tidak boleh di akses
(+) sudo gedit /etc/squid/ip-ojo
Di isi dengan IP address yang tidak boleh di akses
Setelah selesai kita restart Squid dengan perintah
(+) sudo /etc/init.d/restart squid
NB : Pastikan Sebelum melakukan ini, Kita sudah setting IP server (eth1) yang terhubung dengan Komputer Client.
Copy and WIN : hhttp://bit.ly/copynwin
Copy and WIN : hhttp://bit.ly/copynwin
0 komentar:
Posting Komentar