Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   11.Xây dựng máy chủ Proxy Server - Squid (http://quantrinet.com/forum/forumdisplay.php?f=212)
-   -   Hướng dẫn cấu hình Squid proxy chứng thực mật khẩu (http://quantrinet.com/forum/showthread.php?t=10303)

hoctinhoc 26-12-2021 02:59 PM

Hướng dẫn cấu hình Squid proxy chứng thực mật khẩu
 
Hướng dẫn cấu hình Squid proxy chứng thực mật khẩu


Để xây dựng 1 proxy có chứng thực username, password bạn làm như sau:


sudo yum install squidsudo systemctl start squid

vi /etc/squid/squid.conf

1. Thay đổi port

http_port 8888

2. Cho phép tất cả IP truy cập được proxy

http_access allow all

3. Yêu cầu nhập username, password khi truy cập proxy (lệnh sau để tạo 1 username tên là user1 và pass: 123456 cho proxy)

printf "user1:$(openssl passwd -crypt 123456)\n" | sudo tee -a /etc/squid/htpasswd

Sau đó thêm 4 dòng sau vào /etc/squid/squid.conf
# add these 4 lines
auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/htpasswd
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated

Restart lại squid proxy

sudo systemctl restart squid



Tham khảo:



https://shouts.dev/install-and-confi...roxy-on-centos


hoặc


https://www.server-world.info/en/not..._7&p=squid&f=1


Bây giờ là 07:28 PM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.