29 Oktober 2010

Konfigurasi Proxy Server Debian Lenny


Setelah MengKonfigurasi FTP Server, Sekarang kita akan belajar mengkonfigurasi Proxy Server. Menurut saya ini adalah konfigurasi yang sangat membutuhkan ketelitian. So, Becarefull with your step..!

*Kata2 bercetak tebal adalah perintah yang harus dijalankan.
*Kata2 berwarna merah adalah perubahan/sesuatu yang harus anda buat.

1) apt-get install squid
2) rm /etc/squid/squid.conf
3) pico /etc/squid/squid.conf
acl all src all
acl localnet src 172.16.1.0/26
acl situs url_regex -i "/etc/squid/blokir.txt"
http_access deny situs
http_access allow localnet
http_access allow all
http_port 3128 transparent
cache_mem 8 mb
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
store_dir_select_algorithm round-robin
cache_dir aufs /cache 10000 24 256
cache_store_log none
cache_access_log /var/log/squid/access.log
cache_effective_user proxy
cache_effective_group proxy
visible_hostname proxy.situstkj.co.cc





3) pico /etc/squid/blokir.txt
sub.situstkj.co.cc

4) mkdir /cache
5) chown –R proxy:proxy /etc/squid/blokir.txt
6) chown –R proxy:proxy /cache
7) /etc/init.d/squid stop
8) squid –z
2010/10/16 19:43:30| Creating Swap Directories

9) /etc/init.d/squid start
10) pico /etc/rc.local

iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port 3128
#exit 0

11) /etc/init.d/squid restart
Restarting Squid HTTP proxy: squid Waiting.....................done.

12) Buka browser komp client dan buka http://sub.situstkj.co.cc anda akan melihat tampilan ini:

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMd1vevXy-NWl0H_UXI5Swl8b9HnhE92aNIzNX8Ru46TvSdEHVBhBvckwhT-igMQ4P1hVMU-Cf39jpc0335JgI37pwfF0eMrNVY0wFqSJAd60P0UYKGpLVNxSORuNWkalWlKtG5aUc-A4L/s320/ScreenHunter_04+Oct.+16+19.50.jpg

12) tail -f /var/log/squid/access.log
1287233395.322 6 172.16.1.2 TCP_DENIED/403 1454 GET http://sub.situstkj.co.cc/ - NONE/- text/html * (ini adalah log dari website yang diakses oleh client)

Tidak ada komentar:

Posting Komentar