Страница 1 из 1

Не читает banlist sams

Добавлено: Пт июн 28, 2013 3:57
Happypills
Проблема заключается в том, что при установке/переустановке режика он работает нормально.
После перезагрузки перестаёт читать банлист самса, при реконфигурации squid через web интерфейс в /usr/local/rejik3/_sams_banlists/default_denied/urls пишет добавленные мной адреса, при этом доступ к ним остается. Если перезагрузить комп то доступ блокируется...
Похоже что при реконфигурации rejik не перезапускается
Помогите разобраться в чем проблема, вот конфиги squid sams rejik

squid.conf
  • # high_response_time_warning 0

    # TAG: high_page_fault_warning
    # If the one-minute average page fault rate exceeds this
    # value, Squid prints a WARNING with debug level 0 to get
    # the administrators attention. The value is in page faults
    # per second.
    #
    #Default:
    # high_page_fault_warning 0

    # TAG: high_memory_warning
    # If the memory usage (as determined by mallinfo) exceeds
    # this amount, Squid prints a WARNING with debug level 0 to get
    # the administrators attention.
    #
    #Default:
    # high_memory_warning 0 KB

    # TAG: sleep_after_fork (microseconds)
    # When this is set to a non-zero value, the main Squid process
    # sleeps the specified number of microseconds after a fork()
    # system call. This sleep may help the situation where your
    # system reports fork() failures due to lack of (virtual)
    # memory. Note, however, if you have a lot of child
    # processes, these sleep delays will add up and your
    # Squid will not service requests for some amount of time
    # until all the child processes have been started.
    # On Windows value less then 1000 (1 milliseconds) are
    # rounded to 1000.
    #
    #Default:
    # sleep_after_fork 0

    # TAG: zero_buffers on|off
    # Squid by default will zero all buffers before using or reusing them.
    # Setting this to 'off' will result in fixed-sized temporary buffers
    # not being zero'ed. This may give a performance boost on certain
    # platforms but it may result in undefined behaviour at the present
    # time.
    #
    #Default:
    # zero_buffers on

    # TAG: windows_ipaddrchangemonitor on|off
    # On Windows Squid by default will monitor IP address changes and will
    # reconfigure itself after any detected event. This is very useful for
    # proxies connected to internet with dial-up interfaces.
    # In some cases (a Proxy server acting as VPN gateway is one) it could be
    # desiderable to disable this behaviour setting this to 'off'.
    # Note: after changing this, Squid service must be restarted.
    #
    #Default:
    # windows_ipaddrchangemonitor on
sams.conf
  • [client]
    SQUID_DB=squidlog
    SAMS_DB=squidctrl
    MYSQLHOSTNAME=localhost
    MYSQLUSER=sams
    MYSQLPASSWORD=
    MYSQLVERSION=5.1
    SQUIDCACHEFILE=access.log
    SQUIDROOTDIR=/usr/local/etc/squid
    SQUIDLOGDIR=/var/squid/logs
    SQUIDCACHEDIR=/var/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=servername_or_ipadress
    #LDAPBASEDN=your.domain
    #LDAPUSER=DomainAdministrator
    #LDAPUSERPASSWD=passwd
    #LDAPUSERSGROUP=Users
    REJIKPATH=/usr/local/rejik3
    SHUTDOWNCOMMAND=/sbin/shutdown -h now
    CACHENUM=0

redirector.conf
  • #
    # ban_dir dirname # Dir with rules for this section
    # url http://host/file # url to replace
    # # May use: url http://host/file?var=#URL#&var2=#IP#&i= ... c=#SECTION#
    # # #URL# #IP# #IDENT# #METHOD# #SECTION# will be change by redirector
    #
    # work_ip IP # Ip adress(network)
    # work_ip IP/MASK # or file with ip for
    # work_ip f:/path/file # who section work
    #
    # allow_ip IP # Ip adress(network)
    # allow_ip IP/MASK # or file with ip for
    # allow_ip f:/path/file # who section don't work
    #
    #
    # work_id login # login or file with logins
    # work_id f:/path/file # for who section work
    #
    # allow_id login # login or file with logins
    # allow_id f:/path/file # for who secion don't work
    #
    # log off # Not write to log changes from this section
    # reverse # Reverse result of search in ban dir
    # action pass # Pass request
    #
    #############################################################

    error_log /usr/local/rejik3/redirector.err
    change_log /usr/local/rejik3/redirector.log
    make-cache /usr/local/rejik3/make-cache

    #allow_urls /usr/local/rejik3/banlists/allow_urls
    #write_hostname_to_log on

    <BANNER>
    ban_dir /usr/local/rejik3/banlists/banners
    url http://127.0.0.1/ban/1x1.gif
    #log off

    <PORNO>
    ban_dir /usr/local/rejik3/banlists/porno
    url http://127.0.0.1/messages/porno.html

    <MP3>
    ban_dir /usr/local/rejik3/banlists/mp3
    url http://127.0.0.1/messages/mp3.html

    <JS>
    ban_dir /usr/local/rejik3/banlists/js
    url http://127.0.0.1/ban/js.js
    #log off
    <_sams_default_denied>
    work_id f:/usr/local/rejik3/default.sams
    ban_dir /usr/local/rejik3/_sams_banlists/default_denied
    url http://192.168.1.7/sams/messages/blocke ... d&url=#URL# #_sams_
[/list]

Re: Не читает banlist sams

Добавлено: Пт июн 28, 2013 4:47
Happypills
При ручном перезапуске squid'a всё работает нормально
#killall -9 squid
#squid

Re: Не читает banlist sams

Добавлено: Пт июн 28, 2013 5:13
Happypills
Разобрался.
Дело оказалось /var/squid/logs/squid.pid
по какой-то неведомой причине владельцем был root
помогло
#killall -9 squid
#rm /var/squid/logs/squid.pid
#reboot
И всё завелось как надо