281 lượt xem

Hướng dẫn cài đặt Squid Proxy Centos

Sau đây mình sẽ hướng dẫn các lệnh để cái đặt proxy http

yum update -y
 yum -y install squid
 chkconfig squid on
 service squid start
 cài nano nếu chưa có : yum install nano -y ( nếu có rồi thì khỏi cài lệnh này )
 nano /etc/squid/squid.conf
 pass dưới dòng acl connect method
 auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
 auth_param basic children 5
 auth_param basic realm Squid Basic Authentication
 auth_param basic credentialsttl 2 hours
 acl auth_users proxy_auth REQUIRED
 http_access allow auth_users

Đổi Port tại dòng: http_port xxx (xxx là port mình muốn)
 Đổi http_access deny all thành http_access allow all để im deny .
 Ấn Ctrl + X, chọn Y để lưu lại file

# yum -y install httpd-tools
 Step 2:
 touch /etc/squid/passwd
 chown squid: /etc/squid/passwd
 htpasswd /etc/squid/passwd visaothe

service squid restart
 firewall-cmd --permanent --add-port=post bạn muốn/tcp
 firewall-cmd --reload

Xem thêm hướng dẫn video tại đây

0 0 đánh giá
Đánh giá bài viết
Theo dõi
Thông báo của
guest
0 Góp ý
Phản hồi nội tuyến
Xem tất cả bình luận