【发布时间】:2018-12-03 13:48:12
【问题描述】:
我在同一台服务器上有很多 ips,我正在使用 squid 基本身份验证。
示例 - 我有两个 ips 和 2 个用户以及一个端口 3128。问题是任何用户都可以使用任何传出 ips。
下面是我的鱿鱼配置:
acl http proto http
acl port_80 port 80
acl port_443 port 443
acl CONNECT method CONNECT
auth_param basic program /usr/bin/python /path/to/authenticationscript
auth_param basic realm Please enter username and password
auth_param basic credentialsttl 1 second
acl AuthUsers proxy_auth REQUIRED
external_acl_type userip %SRC %LOGIN /usr/lib/squid/ext_file_userip_acl -f /path/to/config.file
acl userip external userip
http_access allow userip
http_access deny all
http_port 3128 name=0
acl ip1 myportname 0
tcp_outgoing_address x.x.x.0 ip1
acl ip2 myportname 1
tcp_outgoing_address x.x.x.1 ip2
其中 x.x.x.x 是服务器的 IP 地址。
在我拥有的 config.file 中
x.x.x.0(ipaddress1) user1
x.x.x.1(ipaddress2) user2
如何让一个用户连接到一个 ip?
【问题讨论】:
标签: acl basic-authentication squid