Blogger, SEO, Internet Gratis, SSH Gratis, Download, Software PC, Earn Money, BitCoin

Cara Install Squid Proxy Server Di VPS ( OS Debian 32 bit/64 bit )


Cara Install Squid Proxy Server Di VPS ( OS Debian 32 bit/64 bit ) - Kali ini saya akan mengajarkan kepada anda Cara Install Squid Proxy Server di VPS ( OS Debian 32 bit/64 bit ). Bagi yang suka Gretongan menggunakan T-SEL pasti anda menggunakan Proxy untuk mengconnactkan Inject dengan SSH anda. Maka dari itu saya akan mengajarkan menginstall Squid Proxy di VPS anda biar lebih wus gretonganya.

Kelebihan Menggunakan Proxy Server:


  • Untuk menyembunyikan alamat IP komputer anda
  • Untuk mempercepat koneksi Internet, karena proxy server mengunakan teknik caching.
  • Untuk menghemat bandwidth dan mencegah download file yang sama berulang-ulang.
  • Untuk melakukan memindai file yang diakses dari serangan malware/virus
  • Untuk melakukan memindai trafik keluar (menghindari pencurian data)
  • Untuk memblokir situs
  • Untuk mengakses situs yang diblokir oleh ISP/Kantor/Sekolah, dll.


Berikut adalah langkah-langkahnya:

  • Langkah pertama, Update dulu. Ketikkan perintah:
apt-get update && apt-get upgrade
  • Kemudian Install Squid, dengan perintah:
apt-get install squid
  • Karena kita akan menggunakan modul NCSA untuk sistem authentikasi (login), maka kita harus install apache2-utils agar kita bisa menggunakan perintah htpasswd untuk membuat username & password. ketikkan perintah:
apt-get install apache2-utils
  • Selanjutnya membuat username & password, masukkan perintah:
 htpasswd -c /etc/squid/passwd username
  • NOTE: ganti username dengan username yang anda inginkan.
  • Kemudian anda akan diminta untuk memasukan password.
  • Agar squid bisa membaca file passwd yang barusan anda buat, ketikkan perintah:
chmod o+r /etc/squid/passwd
  • Selanjutnya masukan perintah:
dpkg -L squid | grep ncsa_auth
  • Output perintah diatas akan muncul lokasi ncsa_auth yang biasanya adalah /usr/lib/squid/ncsa_auth
  • Berikutnya kita akan melakukan konfigurasi file squid.conf sesuai dengan kebutuhan kita. Backup dulu default squid.conf dengan perintah:
mv /etc/squid/squid.conf /etc/squid/squid.conf.old
  • Kita buat file squid.conf baru dengan perintah:
nano /etc/squid/squid.conf
  • Kemudian masukan code dibawah ini:
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off

acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl ncsa_users proxy_auth REQUIRED

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 allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow ncsa_users
http_access deny all

icp_access deny all
http_port 3128
hierarchy_stoplist cgi-bin ?
cache_dir ufs /var/spool/squid 1000 16 256
access_log /var/log/squid/access.log squid
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern (Release|Packages(.gz)*)$       0       20%     2880
refresh_pattern .               0       20%     4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
dns_nameservers 8.8.8.8 8.8.4.4
hosts_file /etc/hosts
coredump_dir /var/spool/squid

  • Restart perintah:

/etc/init.d/squid restart

  • Selesai... Untuk memeriksa apakah Squid sudah berjalan atau tidak, masukan perintah:

netstat -pln | grep squid
Jika berjalan dengan baik akan keluar seperti ini:

tcp         0      0 0.0.0.0:3128            0.0.0.0:*        LISTEN      2594/(squid)
udp        0      0 0.0.0.0:3130            0.0.0.0:*                           2594/(squid)
udp        0      0 0.0.0.0:44716          0.0.0.0:*                           2594/(squid) 


Download ( Full Speed )
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : Cara Install Squid Proxy Server Di VPS ( OS Debian 32 bit/64 bit )

0 Komentar:

Post a Comment