설치
yum install squid -y
dnf install squid -y
활성화
systemctl enable --now squid
방화벽 허용
sudo firewall-cmd --add-port=3128/tcp --permanent
sudo firewall-cmd --reload
squid 기본 설정 (모든 host 접속 허용)
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost
# And finally deny all other access to this proxy
http_access deny all
기본적으로 모든 host 접속 차단 + 특정 host만 접속 허용
(특정 host만 접속 허용)
acl github_api dstdomain api.github.com
acl github_main dstdomain github.com
http_access allow github_api
http_access allow github_main
(그 외 모두 차단)
http_access deny all
로그 확인 (어떤 host에 접속을 시도하는지 이력 확인 가능)
tail -f /var/log/squid/access.log
'OS > LINUX, UNIX' 카테고리의 다른 글
sudo 사용했을 시 특정 명령어 command not found 발생하는 현상 (0) | 2024.08.30 |
---|---|
[Linux] Red Hat Enterprise Linux 릴리즈 노트 (0) | 2024.08.26 |
[linux] maven 설치 (0) | 2024.08.05 |
[linux] openjdk 설치 명령어 (0) | 2024.08.05 |
[Linux] 커널 파라미터 - 네트워크 파라미터 튜닝 (0) | 2024.04.15 |