Documente Academic
Documente Profesional
Documente Cultură
rhonnie_media@smkn1curup.sch.id
Proxy merupakan aplikasi yang di dalamDebian Woody, aplikasi ini digunakan untuk memblokir
situs-situs yang tidak diperkenankan untuk masuk atau melewati server atau router yang kita
konfigurasi. Dengan tak panjang lebar, langsung saja saya jabarkan sederetan command konfigurasi
proxy.
Sebelum kita melakukan konfigurasi, lakukan terlebih dahulu installasi paket yang kita perlukan
Nah kalo installasi squid sudah berhasil, lakukan konfigurasi file“squid.conf”. File squid.conf ada di
#cd /etc/
Nah kalo sudah masuk, buka dan edit file squid.conf. Original file squid.conf sebagai berikut :
WELCOME TO SQUID 2
------------------
##
##
The default Squid config file shows what the defaults for
case.
## NETWORK OPTIONS
# -----------------------------------------------------------------------------
# TAG:http_port
Usage: port
hostname:port
1.2.3.4:port
##
The socket addresses where Squid will listen for HTTP client
There are three forms: port alone, hostname with port, and
##
##
...
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
# TAG:icp_access
access lists
##
##
##Default:
# TAG:miss_access
a parent.For example:
##
#
miss_accessdeny !localclients
##
This means that only your local clients are allowed to fetch
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
# TAG:icp_access
access lists
Tekan lagi tombol F7 dan inputkan kalimat“httpd_accel”, layar akan menampilkan command
sebagai berikut :
# HTTPD-ACCELERATOR OPTIONS
# -----------------------------------------------------------------------------
# TAG:httpd_accel_host# TAG:httpd_accel_port#
host name and port number where the real HTTP server is.
##
as "virtual".
##
If you want virtual port support then specify the port as "0".
##
##Default:
# httpd_accel_port 80
server then set this to on. This causes Squid to forward the request
says.
##
Leave this at off if you have multiple backend servers, and use a
redirector (or host table or private DNS) to map the requests to the
#
names or caching will fail, as cacing is performed using the
##
##Default:
# httpd_accel_single_host off
# HTTPD-ACCELERATOR OPTIONS
# -----------------------------------------------------------------------------
# TAG:httpd_accel_host# TAG:httpd_accel_port#
host name and port number where the real HTTP server is.
##
as "virtual".
##
If you want virtual port support then specify the port as "0".
##
##Default:
# httpd_accel_port 80
httpd_accel_port 80
httpd_accel_host virtual
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
server then set this to on. This causes Squid to forward the request
says.
Terakhir simpan file tersebut dengan menekan tombol F2 dan keluar dengan menekan tombol F10
Berikut lakukan kembali konfigurasi-konfigurasi beserta penambahan file. Tahap selanjutnya kita
akan membuat sebuah file yang berisikan alamat-alamat yang akan kita blok (tidak boleh masuk).
Masih di direktori /etc/ ciptakan file“larang” hal ini sesuai dengan konfigurasi kita pada baris“acl
larang url_regex–i“/etc/larang”
#mcedit larang
Kemudian inputkan alamat-alamat yang akan kita blok. Contoh alamat yang kita blok :
google.com
yahoo.com
yahoo
Kemudian simpan file tersebut. Tekan tombol F2 kemudian keluar tekan tombol F10
--to-
port 3128
Selanjutnya kita permanenkan iptables kita, jangan sampai lupa untuk menyimpannya, karena bila
kita tidak menyimpannya, maka apabila komputer reboot, konfigurasi iptables hilang.
Untuk menyimpannya buat terlebih dulu filedimana nantinya untuk menyimpan atau meletakkan
konfigurasi iptables.
Di sini kita buat file“myiptables” untuk tempat menyimpan konfigurasi iptables
../etc#touch myiptables
#iptables-save >myiptables
Kemudian buat sebuah file sebagai aplikasi untuk loading file myiptables :
#mcedit iptablesload
Simpan file tersebut dengan tombol F2 dan keluar dengan F10. Berikan permission atau izin untuk
#cd rc.boot
#/etc/init.d/squid restart