0% found this document useful (0 votes)
120 views2 pages

Instalasi Dan Konfigurasi Squid Di Centos 7

This document provides instructions for installing and configuring the Squid proxy server on CentOS 7. It involves: 1. Updating CentOS and installing the EPEL repository 2. Installing Squid 3. Configuring Squid's squid.conf file to allow access from internal clients at 192.168.40.0/24 and deny unsafe ports 4. Enabling and starting the Squid service and checking its status
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views2 pages

Instalasi Dan Konfigurasi Squid Di Centos 7

This document provides instructions for installing and configuring the Squid proxy server on CentOS 7. It involves: 1. Updating CentOS and installing the EPEL repository 2. Installing Squid 3. Configuring Squid's squid.conf file to allow access from internal clients at 192.168.40.0/24 and deny unsafe ports 4. Enabling and starting the Squid service and checking its status
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

INSTALASI DAN KONFIGURASI SQUID DI CENTOS 7

1. Lakukan update Centos 7 dengan perintah berikut :


# yum -y update

2. Install repository epel:


# yum -y install epel-release

3. Kemudian Install squid:


# yum -y install squid

4. Lakukan konfigurasi pada squid.conf :


# vim /etc/squid/squid.conf

Sesuaikan dengan konfigurasi berikut:


# Allowed source
acl kominfo_lan src 192.168.40.0/24

acl SSL_ports port 443


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 CONNECT method CONNECT

# Deny requests to certain unsafe ports


http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports


http_access deny CONNECT !SSL_ports

# Only allow cachemgr access from localhost


http_access allow localhost manager
http_access deny manager
http_access deny to_localhost

# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
# from where browsing should be allowed
http_access allow kominfo_lan
http_access allow localhost

# And finally deny all other access to this proxy


http_access allow all
# Squid normally listens to port 3128
http_port 3128

# Leave coredumps in the first cache dir


coredump_dir /var/spool/squid

# Add any of your own refresh_pattern entries above these.


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. Perbolehkan service squid pada firewall dengan perintah berikut:


# firewall-cmd –add-service=squid --permanent
# firewall-cmd –reload

6. Aktifkan squid dengan perintah berikut:


# systemctl start squid
# systemctl enable squid
# systemctl status squid

7. Untuk melihat log dari squid, masukan perintah berikut:


# tail -f /var/log/squid/access.log

You might also like