Не работает ограничение пользователей по IP в SAMS
Добавлено: 2009-11-11 15:35:19
Установил SAMS 1.0.4,1 на FreeBSD 6.4. Через веб интерфейс завожу пользователя указав с какаго ip можно заходить. В настройках SAMS стоит "способ аутентификации пользователя: IP" На клиента выставляю прокси. При заходе в интернет эксплорере выдает доступ запрещен. Почему не пускает?
squid.conf:
sams.conf:
P.S. Если в настройках SAMS указать "способ аутентификации пользователя: NCSA" то введя логин и пароль пускает и все работает.
squid.conf:
Код: Выделить всё
auth_param basic program /usr/local/libexec/squid/ncsa_auth /usr/local/etc/squid/ncsa.sams
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
#acl squidusers proxy_auth REQUIRED
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#http_access allow localnet
#http_access allow squidusers
http_access deny all
#icp_access allow localnet
icp_access deny all
http_port 8080
hierarchy_stoplist cgi-bin ?
access_log /var/log/squid/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
cache_mgr my@my.org
cache_effective_user squid
cache_effective_group squid
visible_hostname my.org
dns_nameservers aaa.bbb.ccc.eee
forwarded_for off
coredump_dir /usr/local/squid/cache
sams.conf:
Код: Выделить всё
SQUID_DB=squidlog
SAMS_DB=squidctrl
MYSQLHOSTNAME=localhost
MYSQLUSER=sams
MYSQLPASSWORD=*******
MYSQLVERSION=5.1
SQUIDCACHEFILE=access.log
SQUIDROOTDIR=/usr/local/etc/squid
SQUIDLOGDIR=/var/log/squid
SQUIDCACHEDIR=/usr/local/squid/cache/
SAMSPATH=/usr/local
SQUIDPATH=/usr/local/sbin
SQUIDGUARDLOGPATH=/var/log
SQUIDGUARDDBPATH=/var/db/squidGuard
RECODECOMMAND=iconv -f KOI8-R -t 866 %finp > %fout
;LDAPSERVER=server_or_ipadress
;LDAPBASEDN=your.domain
;LDAPUSER=DomainAdministrator
;LDAPUSERPASSWD=passwd
'LDAPUSERSGROUP=Users
REJIKPATH=/usr/local/rejik
SHUTDOWNCOMMAND=/sbin/shutdown -h now
CACHENUM=0
P.S. Если в настройках SAMS указать "способ аутентификации пользователя: NCSA" то введя логин и пароль пускает и все работает.