имеем сквид, самс, без редиректора, с авторизацией тупо по Ip
создаем в самсе "доступ разрешен" - allowurls, туда запихиваем адреса все. в итоге они видны у нас тута:
полный листинг не привожу - тока часть:
Код: Выделить всё
f0s@ubuntu9:/etc/squid$ more 4afd73e41666d.sams
yandex.ru
x5.ru
az.perekrestok.ru/P-Line
az.perekrestok.ru
unlim
limit access
они тоже в виде файлов появляются в /etc/squid:
это анлим:
Код: Выделить всё
f0s@ubuntu9:/etc/squid$ cat 4831439d52dcd.sams
192.168.51.7/255.255.255.255
192.168.51.8/255.255.255.255
192.168.51.17/255.255.255.255
192.168.51.25/255.255.255.255
192.168.51.15/255.255.255.255
192.168.51.32/255.255.255.255
192.168.51.21/255.255.255.255
192.168.51.14/255.255.255.255
192.168.51.100/255.255.255.255
192.168.51.51/255.255.255.255
192.168.51.102/255.255.255.255
192.168.51.52/255.255.255.255
192.168.51.151/255.255.255.255
192.168.51.1/255.255.255.255
это limit access:
Код: Выделить всё
f0s@ubuntu9:/etc/squid$ cat 483162ae0e07b.sams
192.168.51.10/255.255.255.255
192.168.51.13/255.255.255.255
192.168.51.42/255.255.255.255
192.168.51.12/255.255.255.255
192.168.51.23/255.255.255.255
192.168.51.20/255.255.255.255
192.168.51.18/255.255.255.255
192.168.51.24/255.255.255.255
192.168.51.11/255.255.255.255
192.168.51.22/255.255.255.255
192.168.51.31/255.255.255.255
192.168.51.16/255.255.255.255
192.168.51.37/255.255.255.255
192.168.51.26/255.255.255.255
192.168.51.58/255.255.255.255
192.168.51.19/255.255.255.255
192.168.51.111/255.255.255.255
задачу ставлю такую - группа unlim ходит в инет без ограничений. а группа limit access у меня стоит - доступ запрещен, кроме allowurls
делаю в самсе реконфигуре
смотрю конфиг сквида что добавилось, там такое: (все остальное это стандартный конфиг)
Код: Выделить всё
acl _sams_4831439d52dcd src "/etc/squid/4831439d52dcd.sams"
acl _sams_4831439d52dcd_time time MTWHFAS 00:00-23:59
acl _sams_483162ae0e07b src "/etc/squid/483162ae0e07b.sams"
acl _sams_483162ae0e07b_time time MTWHFAS 00:00-23:00
acl _sams_4afd73e41666d url_regex "/etc/squid/4afd73e41666d.sams"
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
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 Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow _sams_4831439d52dcd _sams_4831439d52dcd_time
http_access deny _sams_483162ae0e07b !_sams_4afd73e41666d _sams_483162ae0e07b_time
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
Код: Выделить всё
acl _sams_4831439d52dcd src "/etc/squid/4831439d52dcd.sams" # здесь описаны все те, у кого UNLIM
acl _sams_4831439d52dcd_time time MTWHFAS 00:00-23:59
acl _sams_483162ae0e07b src "/etc/squid/483162ae0e07b.sams" # здесь описаны все те, у кого LIMIT ACCESS
acl _sams_483162ae0e07b_time time MTWHFAS 00:00-23:00
acl _sams_4afd73e41666d url_regex "/etc/squid/4afd73e41666d.sams" # это файл с разрешенными сайтами
Код: Выделить всё
http_access allow _sams_4831439d52dcd _sams_4831439d52dcd_time # разрешить группе UNLIM все
http_access deny _sams_483162ae0e07b !_sams_4afd73e41666d _sams_483162ae0e07b_time # запретить группе LIMIT ACCESS все, кроме перечисленных урлов
то есть все вроде правильно, но! не пускает народ из группы LIMIT ACCESS вообще НИКУДА! людей из группы UNLIM пускает куда угодно (как и положено).. не могу понять в чем косяк??
в логах ничего толкового нет, просто:
Код: Выделить всё
1258131018.503 0 192.168.51.111 TCP_DENIED/403 1464 GET http://news.yandex.ru/yandsearch?cl4url=www.interfax.ru%2Fsociety%2Fnews.asp%3Fid%3D109923 - NONE/- text/html