The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]




Версия для распечатки Пред. тема | След. тема
Новые ответы [ Отслеживать ]
Не работают url_regex и urlpath_regex, !*! SA, 28-Окт-03, 11:33  [смотреть все]
FreeBSD 4.8
SQUID 2.5 STABLE4

squid.conf:
....................
acl banners url_regex "/usr/local/squid/etc/badhost"
http_access deny badhost
....................
http_access deny all

В /usr/local/squid/etc/badhost написал ^http://сраныйхост.домен.ру
рестартанул squid -k reconfigure

Сайт прекрасно открывается....
Как это понимать?

  • Не работают url_regex и urlpath_regex, !*! SA, 11:48 , 28-Окт-03 (1)
    Ошибка была

    FreeBSD 4.8
    SQUID 2.5 STABLE4
    squid.conf:
    ....................
    acl badhost url_regex "/usr/local/squid/etc/badhost"
    http_access deny badhost
    ....................
    http_access deny all

    В /usr/local/squid/etc/badhost написал ^http://сраныйхост.домен.ру
    рестартанул squid -k reconfigure

    Сайт прекрасно открывается....
    Как это понимать?

    • Не работают url_regex и urlpath_regex, !*! ipmanyak, 12:46 , 28-Окт-03 (2)
      покажи все цепочки правил, возможно этот аксель стоит уже после разрешения
      акселей юзеров .
      • Не работают url_regex и urlpath_regex, !*! SA, 13:45 , 28-Окт-03 (3)
        Вот, правда я уже тут намутил и стало немного не так, как раньше:

        #Recommended minimum configuration:
        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 563
        acl Safe_ports port 80        # http
        acl Safe_ports port 21        # ftp
        acl Safe_ports port 443 563    # https, snews
        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 our_networks src 192.168.0.0/255.255.0.0
        acl inet dst 0.0.0.0/0.0.0.0
        acl bad_urls url_regex "/usr/local/squid/etc/bad_urls"
        acl good_urls url_regex "/usr/local/squid/etc/good_urls"
        ############################################

        #Default:
        # http_access deny all
        #
        #Recommended minimum configuration:
        #
        # Only allow cachemgr access from localhost
        http_access allow manager localhost
        http_access deny manager
        # Deny requests to unknown ports
        http_access deny !Safe_ports
        # Deny CONNECT to other than SSL ports
        http_access deny CONNECT !SSL_ports
        #
        # We strongly recommend to uncomment the following to protect innocent
        # web applications running on the proxy server who think that the only
        # one who can access services on "localhost" is a local user
        http_access deny to_localhost
        #
        # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS

        # Exampe rule allowing access from your local networks. Adapt
        # to list your (internal) IP networks from where browsing should
        # be allowed
        #acl our_networks src 192.168.1.0/24 192.168.2.0/24
        #http_access allow our_networks

        ######################################
        http_access allow our_networks

        ######################################
        # And finally deny all other access to this proxy
        http_access deny all

        ............................................
        http_access я убрал. Помогите расставить правильно.

        Спасибо.

        • Не работают url_regex и urlpath_regex, !*! ipmanyak, 14:41 , 28-Окт-03 (4)
          http_access allow good_urls
          http_access deny bad_urls
          http_access allow our_networks
          http_access deny all
          • Не работают url_regex и urlpath_regex, !*! SA, 16:37 , 28-Окт-03 (5)
            >http_access allow good_urls
            >http_access deny bad_urls
            >http_access allow our_networks
            >http_access deny all

            Спасибо, а подскажи ещё вот что: прописал cache_peer всяких и хочу, чтобы только один домен шёл через parent, а остальное как обычно. Но что-то не клеится, наверно опять не в том порядке я расставил...то все через parent, то наоборот...

            ##############################################
            cache_peer ###.###.###.### parent 3128 7 no-query
            ##############################################
            acl borda dstdomain www.borda.ru
            ##############################################
            always_direct deny borda
            never_direct allow all

            always_direct allow inet
            always_direct allow all
            ##############################################

            Большущее спасибо!




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру