Cara Install dan Setting Squid Proxy Server di CentOS

Cara Install dan Setting Squid Proxy Server on CentOSSquid adalah aplikasi proxy server yang bertugas menyimpan cache yang dimana cache adalah satu penyimpanan sementara yang berguna mempercepat transmisi data oleh server.

Squid server sangat berguna untuk memperhemat bandwidth internet Anda, karena setiap halaman yang setelah dibuka akan otomatis ter-cache diserver. Sehingga ketika Anda membuka alamat tersebut kembali akan terasa lebih cepat karena diambil dari server squid proxy.

Proxy Server berfungsi untuk:

  1. Melakukan cache website yang di akses oleh klien
  2. Mempercepat akses website yang sudah dicache oleh server
  3. Membuka semua website yang diblokir
  4. Meningkatkan keamanan dalam menjelajah dunia maya.

Keuntungan menggunakan squid proxy?

  • Untuk menyembunyikan alamat IP komputer klien
  • 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 mengakses situs yang diblokir oleh ISP/Kantor/Sekolah, dll.
  • dan masih banyak lagi benefit penggunaan proxy server.

Berikut ini Cara Install dan Setting Squid Proxy Server on CentOS

1. Install squid via Putty atau BitVise

 

# yum install squid -y

 

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.maulvi.net
 * extras: centos.maulvi.net
 * updates: centos.maulvi.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package squid.i686 7:3.1.10-1.el6_2.1 will be installed
--> Processing Dependency: perl(Getopt::Long) for package: 7:squid-3.1.10-1.el6_2.1.i686
--> Processing Dependency: perl(integer) for package: 7:squid-3.1.10-1.el6_2.1.i686
--> Processing Dependency: perl(Pod::Usage) for package: 7:squid-3.1.10-1.el6_2.1.i686
--> Processing Dependency: perl(DBI) for package: 7:squid-3.1.10-1.el6_2.1.i686
--> Processing Dependency: perl(Digest::MD5) for package: 7:squid-3.1.10-1.el6_2.1.i686
--> Processing Dependency: perl(vars) for package: 7:squid-3.1.10-1.el6_2.1.i686
--> Processing Dependency: libltdl.so.7 for package: 7:squid-3.1.10-1.el6_2.1.i686
--> Processing Dependency: perl(strict) for package: 7:squid-3.1.10-1.el6_2.1.i686
--> Processing Dependency: /usr/bin/perl for package: 7:squid-3.1.10-1.el6_2.1.i686
--> Processing Dependency: perl(Getopt::Std) for package: 7:squid-3.1.10-1.el6_2.1.i686
--> Processing Dependency: perl(Net::POP3) for package: 7:squid-3.1.10-1.el6_2.1.i686
--> Running transaction check
---> Package libtool-ltdl.i686 0:2.2.6-15.5.el6 will be installed
---> Package perl.i686 4:5.10.1-119.el6_1.1 will be installed
--> Processing Dependency: perl-libs = 4:5.10.1-119.el6_1.1 for package: 4:perl-5.10.1-119.el6_1.1.i686
--> Processing Dependency: perl-libs for package: 4:perl-5.10.1-119.el6_1.1.i686
--> Processing Dependency: perl(Pod::Simple) for package: 4:perl-5.10.1-119.el6_1.1.i686
--> Processing Dependency: libperl.so for package: 4:perl-5.10.1-119.el6_1.1.i686
--> Processing Dependency: perl(version) for package: 4:perl-5.10.1-119.el6_1.1.i686
--> Processing Dependency: perl(Module::Pluggable) for package: 4:perl-5.10.1-119.el6_1.1.i686
---> Package perl-DBI.i686 0:1.609-4.el6 will be installed
--> Running transaction check
---> Package perl-Module-Pluggable.i686 1:3.90-119.el6_1.1 will be installed
---> Package perl-Pod-Simple.i686 1:3.13-119.el6_1.1 will be installed
--> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.13-119.el6_1.1.i686
---> Package perl-libs.i686 4:5.10.1-119.el6_1.1 will be installed
---> Package perl-version.i686 3:0.77-119.el6_1.1 will be installed
--> Running transaction check
---> Package perl-Pod-Escapes.i686 1:1.04-119.el6_1.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                     Arch       Version                    Repository                  Size
====================================================================================================
Installing:
 squid                       i686       7:3.1.10-1.el6_2.1         updates                    1.7 M
Installing for dependencies:
 libtool-ltdl                i686       2.2.6-15.5.el6             CentOS6.2-Repository        45 k
 perl                        i686       4:5.10.1-119.el6_1.1       CentOS6.2-Repository       9.7 M
 perl-DBI                    i686       1.609-4.el6                CentOS6.2-Repository       705 k
 perl-Module-Pluggable       i686       1:3.90-119.el6_1.1         CentOS6.2-Repository        37 k
 perl-Pod-Escapes            i686       1:1.04-119.el6_1.1         CentOS6.2-Repository        30 k
 perl-Pod-Simple             i686       1:3.13-119.el6_1.1         CentOS6.2-Repository       209 k
 perl-libs                   i686       4:5.10.1-119.el6_1.1       CentOS6.2-Repository       590 k
 perl-version                i686       3:0.77-119.el6_1.1         CentOS6.2-Repository        49 k

Transaction Summary
====================================================================================================
Install       9 Package(s)

Total download size: 13 M
Installed size: 38 M
Downloading Packages:
(1/9): squid-3.1.10-1.el6_2.1.i686.rpm                                       | 1.7 MB     00:14
----------------------------------------------------------------------------------------------------
Total                                                               881 kB/s |  13 MB     00:15
warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
 Userid : CentOS-6 Key (CentOS 6 Official Signing Key) 
 Package: centos-release-6-2.el6.centos.7.i686 (@anaconda-CentOS-201112130233.i386/6.2)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 1:perl-Pod-Escapes-1.04-119.el6_1.1.i686                                         1/9
  Installing : 3:perl-version-0.77-119.el6_1.1.i686                                             2/9
  Installing : 4:perl-libs-5.10.1-119.el6_1.1.i686                                              3/9
  Installing : 1:perl-Pod-Simple-3.13-119.el6_1.1.i686                                          4/9
  Installing : 1:perl-Module-Pluggable-3.90-119.el6_1.1.i686                                    5/9
  Installing : 4:perl-5.10.1-119.el6_1.1.i686                                                   6/9
  Installing : perl-DBI-1.609-4.el6.i686                                                        7/9
  Installing : libtool-ltdl-2.2.6-15.5.el6.i686                                                 8/9
  Installing : 7:squid-3.1.10-1.el6_2.1.i686                                                    9/9

Installed:
  squid.i686 7:3.1.10-1.el6_2.1

Dependency Installed:
  libtool-ltdl.i686 0:2.2.6-15.5.el6             perl.i686 4:5.10.1-119.el6_1.1
  perl-DBI.i686 0:1.609-4.el6                    perl-Module-Pluggable.i686 1:3.90-119.el6_1.1
  perl-Pod-Escapes.i686 1:1.04-119.el6_1.1       perl-Pod-Simple.i686 1:3.13-119.el6_1.1
  perl-libs.i686 4:5.10.1-119.el6_1.1            perl-version.i686 3:0.77-119.el6_1.1

2. Bila sudah terinstall tinggal di setting squid-nya

[root@dhansz ~]# nano /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

3. konfigurasi untuk squid file :

[root@dhansz ~]# nano /etc/squid/squid.conf

acl localnet src 10.0.0.0/8     # RFC1918 possible internal network
acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
acl dhansz.com src 192.168.1.0/24    # Your internal network

4. Cek Port yang ingin anda pakai biasanya 3128 atau 8080

# Squid normally listens to port 3128
http_port 3128

5. set supaya squid dapat berjalan auto start at boot :

[root@dhansz ~]# chkconfig squid on

6. Jalankan Squid :

[root@centos62 ~]# service squid restart
Stopping squid: ................                           [  OK  ]
Starting squid: .                                          [  OK  ]

7. Setting Client Browsing seperti dibawah ini :

Pada kolom address masukan IP Server anda
klik untuk melihat gambar. 

8. Sekarang test squid proxy hasil praktek diatas

  • buka mozzila firefox > Tool > Option > Advanced > Network > Settings
  • Pilih Manual Proxy Configuration, lalu isikan IP VPS dan port

klik untuk melihat gambar. 

9. Coba buat Browsing, kalau berhasil maka akan muncul pop up login untuk meminta user + pass

klik untuk melihat gambar. 

Enter your email address:

Delivered by FeedBurner

Tinggalin Pesan

Tenang bro Email aman, ga ane publish >>>Wajib di isi yang ada tanda *

*