Langsung ke konten utama

How to Install Squid Proxy Server on CentOS 6

febripratama.com - How to Install Squid Proxy Server on CentOS 6. We are going to install squid proxy server on centos 6.
This is just another simple tutorial as my previous tutorials on Configuration Basic Server Centos 6. You can view my previous tutorials with clicking the navigation. 
    Squid Proxy Server is a common or a general proxy server on every mainstream server. It is used by many of users around the world. It is good for a learning or a entry level proxy server. Well, lets begin out tutorial.

How to Install Squid Proxy Server on CentOS 6

Steps

1. Before we start our tutorial, it is good to pray before. And wish this will be done at the first try =).
2. This installation will use terminal and an internet connection to download the squid package.
3. Open the terminal by clicking Start Menu or just simply press CTRL+ALT+T.
4.  When the terminal has been appeared. Then we begin the Installation of the squid by entering this command :

#yum install squid
4.  Wait for a second till the installation done. After that we proceed with the configuration it self. Open the config file of squid by using nano.
#nano /etc/squid/squid.conf
5. After the config loaded on the terminal console. Lets begin with changing some rules. Copy all this config file to yours. And we will change some rules afterwards.



6. The explaining of the squid config file.

  • acl pepznet.co.id src 192.168.20.0/24  (change to yours local IP address that will be used for squid)
  •  http_port 3128 transparent (this will make your squid is transparent proxy means that this proxy will automatically run on your local network).
  • http_access allow pepznet.co.id (change to your own local ip or domain. This will give you an authority to your local network)
      *Those are some simple basic configuration, you can change or modify it based on what will you do with your proxy server.

7.  After we done with the squid proxy rule. Then we will do some routing. This step is for redirecting all the network traffic to the squid proxy. So squid can do his job on yout local network.
  • Open the iptables file with nano


#nano /etc/sysconfig/network-scripts/iptables
  •  Include these rules on the iptables file then save it with CTRL+O+ENTER.
-A PREROUTING -i eth2 -p tcp -m tcp --dport 80 -j DNAT --to-destination YOUR_LOCAL_IP:3128
-A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
8. The final step is restarting the iptables and squid  by using this following commands.

#service iptables restart
#service squid restart

And that is it, you have done on the tutorial  How to Install Squid Proxy Server on CentOS 6. If you have any troubles, dont be shy to lay a comment here. Thanks

Komentar

Posting Komentar

Postingan populer dari blog ini

Beberapa Bahasa Pemrograman yang Paling Banyak Digunakan oleh Programmer Wanita

Beberapa Bahasa Pemrograman yang Paling Banyak Digunakan oleh Programmer Wanita - Sepertihalnya programmer pria, para programmer wanita juga pasti memiliki bahasa pemrograman yang sering digunakan. Menurut situs Hackerrank , yaitu situs yang merupakan penyedia coding challenge mengeluarkan laporan dengan judul Women in Tech 2018. Menurut laporan tersebut yang telah melakukan survei pada lebih dari 14.000 developer dan 2000 diantaranya adalah wanita. Dari survei tersebut terdapat pertanyaan yang menyanyakan tentang bahasa pemrograman apa yang anda ketahui? Dari pertanyaan tersebut diperolehlah data yang cukup menarik. Yaitu ternyata Javascript menempati urutan pertama dan disusul oleh C dan C++. Hasil lengkap dari pertanyaan survei  Beberapa Bahasa Pemrograman yang Paling Banyak Digunakan oleh Programmer Wanita tersebut adalah sebagai berikut : Java JavaScript C C++ Python PHP C# Ruby R Perl TypeScript Swift Scala Go Haskell Itulah hasil dari...

Traffic Blog Tinggi Tapi Penghasilan Adsense Rendah

febripratama.com - Traffic Blog Tinggi Tapi Penghasilan Adsense Rendah . Betapa menyenangkannya dan menggembirakannya, aduh alay.