Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 26-12-2021, 02:59 PM   #1
hoctinhoc
Guest
 
Trả Lời: n/a
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
  Trả lời ngay kèm theo trích dẫn này
Gửi trả lời


Công Cụ
Xếp Bài

Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 08:47 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.