| ljily000 回复于:2005-03-13 12:54:28
|
对每个用户能否绑定一个ip,该用户只能在指定ip的机器上通过squid代理出去。
|
| platinum 回复于:2005-03-13 14:00:35
|
可以用acl控制
也可以结合iptables来实现
|
| wingger 回复于:2005-03-13 18:14:42
|
External ACLs
squid2.5版本,有一个ACL扩展功能ip_user,应该可以满足你的要求
如:可能安装的时候要编译进去
[code:1:2707935133]./configure —enable-external-acl-helpers=ip_user[/code:1:2707935133]
配置时要在squid.conf加入如下一行:
[code:1:2707935133]external_acl_type ip_user_helper %SRC %LOGIN
usr/local/squid/libexec/ip_user -f /usr/local/squid/etc/ip_user.conf
acl AclName external ip_user_helper[/code:1:2707935133]
%SRC 指客户IP地址,%LOGIN指用户名. 在ip_user.conf 中的配置 格式如下:
ip_addr[/mask] user|@group|ALL|NONE
例如:
[code:1:2707935133]127.0.0.1 ALL
192.168.1.0/24 bob
10.8.1.0/24 @lusers
172.16.0.0/16 NONE[/code:1:2707935133]
上面的语句意思如下(我就不翻译了):
This configuration file causes ip_user to return OK for any request coming from 127.0.0.1, for Bob's requests coming from the 192.168.1.0/24 network, for any name in the luser group when the request comes from the 10.8.1.0/24 network, and returns ERR for any request from the 172.16.0.0/16 network. It also returns ERR for any address and username pair that doesn't appear in the list.
|
| 段誉 回复于:2005-03-13 18:26:41
|
受教,学习ing
|
| ljily000 回复于:2005-03-22 14:15:42
|
[quote:c478550dd1="wingger"]
上面的语句意思如下(我就不翻译了):
This configuration file causes ip_user to return OK for any request coming from 127.0.0.1, for Bob's requests coming from the 192.168.1.0/24 network, for any na..........[/quote:c478550dd1]
:P :P
[code:1:c478550dd1][code]external_acl_type ip_user_helper %SRC %LOGIN
usr/local/squid/libexec/ip_user -f /usr/local/squid/etc/ip_user.conf
acl AclName external ip_user_helper [/code][/code:1:c478550dd1]
好像差点东西 :P ,
[code:1:c478550dd1]external_acl_type ip_user_helper %SRC %LOGIN
/usr/local/squid/libexec/ip_user_check -f /usr/local/squid/etc/ip_user.conf
acl AclName external ip_user_helper [/code:1:c478550dd1]
找了好半天! :em06:
|