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.
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.
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 squid4. 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.conf5. 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)
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:31288. The final step is restarting the iptables and squid by using this following commands.
-A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
#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
nggak ngerti ane..
BalasHapusYang gak ngerti yang mana gan ? :D
Hapus