Install Squid On CentOS 32 Bit

1.
yum update -y && yum upgrade -y && yum install nano -y
 
2.
yum install squid -y
 
3.
rm -rf /etc/squid/squid.conf && nano /etc/squid/squid.conf 

4. Masukan Script Squid Berikut Ini :
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl SSH dst IP_VPS/24 #IP_VPS ubah IP VPS Masing Masing
http_access allow SSH
http_access allow manager localhost
http_access deny manager
http_access allow localhost
http_access deny all
http_port 8080 transparent # 8080 Boleh Di Ubah Sesuai Kebutuhan
coredump_dir /var/spool/squid3
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
 
5. Iptables Untuk Port 8080
 iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080

6.
service iptables save && service httpd stop && service squid restart