| TKJ 1 COMUNITY |
Instalasi dan konfigurasi proxy server dengan squid
Proxy
server merupakan sebuah server yang memiliki banyak fungsi atau bisa disebut
multi-fungsi , pada dasarnya proxy server berfungsi sebagai cache server atau
sebagai penyimpan halaman-halaman website yang telah dibuka sebelumnya serta
menyimpan alamat IP dari situs tersebut. akan tetapi terkadang sebuah proxy
server juga memiliki fungsi untuk memblokir situs-situs tertentu serta memblok
beberapa kata-kata yang tidak diperbolehkan untuk diakses . aplikasi proxy server dalam system linux yang
cukup populer yaitu “squid”.
|
client
|
|
server
|
Langkah
kerja :
1.
Masukan CD 2
kemudian add CDROM : apt-cdrom add
2.
Instalasi aplikasi squid untuk proxy server : apt-get
–y install squid
3.
Masuk direktori squid : cd /etc/squid
4.
Backup file squid : cp squid.conf squid.bazry
5.
Konfigurasi : nano
squid.conf
Ctrl+w dan ketik :
http_port
3128 ==> tambahkan “transparent”
icp_port
3130 ==> hapus tanda pagar “#”
cache _mem 8
MB ==> hapus tanda pagar “#”
acl connect ==> tambahkan script berikut :
acl local src 192.175.1.0/28
acl domain dstdomain “/etc/squid/domain.txt”
http_access deny domain
http_access allow local
http_access allow all
finally deny all ==> beri tanda (#) pada http access deny all
dan http access allow localhost
simpan dengan
menggunakan tombol : ctrl+x, y lalu enter
6.
Buat file untuk domain yang akan di blokir
Nano
domain.txt
.facebook.com
.youtube.com
7.
Melihat hasil ketik : squid –z
8.
Restart squid : /etc/init.d/squid
restart
Ø Nano /etc/rc.local
echo “1” /proc/sys/net/ipv4/ip_forward
iptables –F
iptables –t nat –F
iptables –t nat –A POSTROUTING -o eth0 –j MASQUERADE
iptables –t nat -A PREROUTING –i
eth1 –p tcp --dport 80 -j REDIRECT --to-ports 3128
semoga sukses kawan-kawanku
Tidak ada komentar:
Posting Komentar