Slide # 1

Slide # 1

Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts Read More

Slide # 2

Slide # 2

Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts Read More

Slide # 3

Slide # 3

Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts Read More

Slide # 4

Slide # 4

Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts Read More

Slide # 5

Slide # 5

Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts Read More

Selasa, 17 Desember 2013

Lakukan instalasi squid di server yang akan dijadikan sebagai proxy server dan persiapkan konfigurasinya (squid.conf). $ apt-get install squid $ mv /etc/squid/squid.conf /etc/squid/squid.conf.orig $ sudo vi /etc/squid/squid.conf Isi konfigurasi dengan konten berikut atau sesuaikan dengan kebutuhan, silahkan refer dokumentasi yang ada di squid.conf.orig : # OPTIONS FOR AUTHENTICATION # Recommended minimum configuration for basic scheme auth_param basic children 10 auth_param basic realm Squid proxy-caching web server auth_param basic credentialsttl 2 hours auth_param basic casesensitive off # ACCESS CONTROLS ##Memblock Domain/Kata terlarang acl blockdomain dstdomain “/etc/squid/blockdomain.txt” acl blockword url_regex -i “/etc/squid/blockword.txt” acl unduh url_regex -i ftp \.exe$ \.mp3$ \.mp4 $ \.tar.gz$ \.gz$ \.tar.bz2$ \.rpm$ \.zip$ \.rar$ acl unduh url_regex -i \.avi$ \.mpg$ \.mpeg$ \.rm$ \.iso$ \.wav$ \.mov$ \.dat$ \.mpe$ \.mid$ acl unduh url_regex -i \.midi$ \.rmi$ \.wma$ \.wmv$ \.ogg$ \.ogm$ \.m1v$ \.mp2$ \.mpa$ \.wax$ acl unduh url_regex -i \.m3u$ \.asx$ \.wpl$ \.wmx$ \.dvr-ms$ \.snd$ \.au$ \.aif$ \.asf$ \.m2v$ acl unduh url_regex -i \.m2p$ \.ts$ \.tp$ \.trp$ \.div$ \.divx$ \.mod$ \.vob$ \.aob$ \.dts$ acl unduh url_regex -i \.ac3$ \.cda$ \.vro$ \.deb$ ## Recommended minimum configuration acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl olan src 192.168.1.0/24 acl to_localhost dst 127.0.0.0/8 acl SSL_ports port 443 # https acl SSL_ports port 563 # snews acl SSL_ports port 873 # rsync acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl Safe_ports port 70 # gopher acl Safe_ports port 210 # wais acl Safe_ports port 1025-65535 # unregistered ports acl Safe_ports port 280 # http-mgmt acl Safe_ports port 488 # gss-http acl Safe_ports port 591 # filemaker acl Safe_ports port 777 # multiling http acl Safe_ports port 631 # cups acl Safe_ports port 873 # rsync acl Safe_ports port 901 # SWAT acl purge method PURGE acl CONNECT method CONNECT http_access deny blockdomain http_access deny blockword http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow manager localhost http_access allow olan http_access deny all http_reply_access allow all icp_access allow all miss_access allow all # NETWORK OPTIONS http_port 3128 transparent # OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM hierarchy_stoplist cgi-bin ? # MEMORY CACHE OPTIONS cache_mem 64 MB maximum_object_size_in_memory 4096 KB memory_replacement_policy lru # DISK CACHE OPTIONS cache_replacement_policy lru cache_dir ufs /var/spool/squid 15000 16 256 minimum_object_size 0 KB maximum_object_size 20480 KB cache_swap_low 90 cache_swap_high 95 # LOGFILE OPTIONS access_log /var/log/squid/access.log cache_log /var/log/squid/cache.log cache_store_log /var/log/squid/store.log logfile_rotate 10 log_ip_on_direct on debug_options ALL,1 client_netmask 255.255.255.255 buffered_logs off # OPTIONS FOR FTP GATEWAYING ftp_user Squid@ ftp_list_width 32 ftp_passive on ftp_sanitycheck on ftp_telnet_protocol on # OPTIONS FOR TUNING THE CACHE ## We recommend you to use the following two lines. acl QUERY urlpath_regex cgi-bin \? no_cache deny QUERY refresh_pattern ^ftp: refresh_pattern ^gopher: refresh_pattern . 0 quick_abort_min 16 KB quick_abort_max 16 KB quick_abort_pct 95 negative_ttl 5 minutes # HTTP OPTIONS ie_refresh on header_access Via deny all # TIMEOUTS connect_timeout 1 minutes read_timeout 15 minutes request_timeout 5 minutes 1440 20% 10080 1440 0% 1440 20% 4320 persistent_request_timeout 1 minutes client_lifetime 5 day pconn_timeout 120 seconds shutdown_lifetime 30 seconds # ADMINISTRATIVE PARAMETERS cache_mgr myserver visible_hostname myserver # DELAY POOL PARAMETERS delay_pools 1 delay_class 1 1 delay_access 1 allow unduh delay_access 1 deny all delay_parameters 1 1000/16000 # SNMP OPTIONS snmp_port 3401 snmp_access allow localhost snmp_access deny all # ICP OPTIONS icp_port 3130 udp_incoming_address 0.0.0.0 udp_outgoing_address 255.255.255.255 # DNS OPTIONS ipcache_size 1024 ipcache_low 90 ipcache_high 95 fqdncache_size 1024 # MISCELANEOUS coredump_dir /var/spool/squid Bikin direktori cache yang telah kita buat, dan bikin juga file-file terkait yang akan berisi daftar domain dan daftar kata yang akan di blok oleh server. $ sudo squid -z $ sudo vi /etc/squid/blockdomain.txt www.rapidshare.com www.playboy.com www.situsporno.com www.situslainnya.com $ sudo vi /etc/squid/blockword.txt adult sex lesbian homo porn porno katakatalainnya Aktifkan penerusan paket (packet forwarding) dengan menghapus tanda # pada bagian enable packet forwarding for IPv4, simpan dan selanjutnya tambahkan routing IP Tables. Arahkan gateway ke IP Modem. Restart networking dan restart squid-nya. $ sudo vi /etc/sysctl.conf # Uncomment the next line to enable packet forwarding for IPv4 net.ipv4.ip_forward=1 Masukkan di “/etc/rc.local” perintah dibawah ini $ sudo iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port 3128 $ sudo vi /etc/network/interfaces Ubah gateway menjadi alamat IP Modem (192.168.1.1) $ sudo /etc/init.d/networking restart $ sudo /etc/init.d/squid restart Dan untuk merubah tampilan yang diblock, perintahnya seperti ini. $ Pico /usr/share/squid/errors/English/ERR_ACCESS_DENIED Langkah-langkah diatas dilakukan di PC yang akan dijadikan sebagai proxy server. Selanjutnya, atur gateway pada setiap PC Client agar mengarah ke IP proxy server (192.168.1.2). Jika PC Client anda ubuntu linux, ada 2 cara untuk mengganti IP Gateway. Cara pertama dengan GUI. * Klik icon bergambar monitor di panel atas sebelah kanan. * Klik Manual Configuration * Klik unlock, lalu masukkan password * Klik Wired / Wireless connection, Lalu klik properties * Ubah gateway address menjadi alamat IP proxy server (192.168.1.2) * Klik OK - CLOSE Cara kedua dengan terminal. $ sudo vi /etc/network/interfaces Ubah gateway menjadi alamat IP proxy server (192.168.1.2) $ sudo /etc/init.d/networking restart $ ping www.google.com PING www.l.google.com (64.233.189.104) 56(84) bytes of data. 64 bytes from hk-in-f104.google.com (64.233.189.104): … dst Yups… jika ping berhasil, maka proxy server telah berfungsi dengan baik

0 komentar:

Posting Komentar