как осуществить доступ по времени?
Re: как осуществить доступ по времени?
недостаточно информации
Re: как осуществить доступ по времени?
у меня все файлы лежат в /usr/local/rejik3/Slava писал(а):при срабатывании крона появляется нужный файл конфига на месте /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf ?
Если да, то в кроне надо добавить релоад сквида, чтобы он перечитывал конфиг.
banlists - папка
tools - папка
make-cache
redirector
obed_social_off.conf
obed_social_on.conf
redirector.conf
redirector.conf.dist
Re: как осуществить доступ по времени?
Пользователь root...0 14 * * 1-5 roor cp /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
Re: как осуществить доступ по времени?
изменил,alexK писал(а):Пользователь root...0 14 * * 1-5 roor cp /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
/usr/sbin/squid3 -k reconfigure
доступа к социал нет!
1448868168.801 24 192.168.23.82 TCP_MEM_HIT/200 1270 GET http://www.vk.com/favicon.ico - HIER_NONE/- text/html
1448868217.822 0 192.168.23.82 TCP_MEM_HIT/200 1270 GET http://www.vk.com/favicon.ico - HIER_NONE/- text/html
2015-11-30 12:23:37 SOCIAL: 192.168.23.82 - http://www.vk.com/favicon.ico (urls rule: vk.com)
Re: как осуществить доступ по времени?
подскажите куда еще посмотреть для решения задачи?
Re: как осуществить доступ по времени?
По крону у Вас должны:
1. Изменится файл конфига режика.
2. Перезапуститься сквид и режик.
Проверьте это по логам, покажите, что получилось.
1. Изменится файл конфига режика.
2. Перезапуститься сквид и режик.
Проверьте это по логам, покажите, что получилось.
Re: как осуществить доступ по времени?
поставил: с 14 до 16 должно пускать в социалSlava писал(а):По крону у Вас должны:
1. Изменится файл конфига режика.
2. Перезапуститься сквид и режик.
Проверьте это по логам, покажите, что получилось.
0 14 * * 1-5 root cd /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
0 16 * * 1-5 root cd /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
#
1. файл режика не поменялся
redirector.log
2015-11-30 15:12:35 SOCIAL: 192.168.23.82 - http://www.vk.com/favicon.ico (urls rule: vk.com)
access.log
1448878355.864 26 192.168.23.82 TCP_MEM_HIT/200 1270 GET http://www.vk.com/favicon.ico - HIER_NONE/- text/html
redirector.err
2015-11-30 15:12:31 [13822] Run make-cache (3.2.11)
2015-11-30 15:12:31 [13822] Make-cache finished
2015-11-30 15:12:31 [13822] Load 4522 rules from /usr/local/rejik3/banlists/banners/urls.cache
2015-11-30 15:12:31 [13822] Load 8 pattern from BANNER pcre
2015-11-30 15:12:31 [13822] Load 22283 rules from /usr/local/rejik3/banlists/porno/urls.cache
2015-11-30 15:12:31 [13822] Load 4 rules from /usr/local/rejik3/banlists/mail/urls.cache
2015-11-30 15:12:31 [13822] Load 5 pattern from MP3 pcre
2015-11-30 15:12:31 [13822] Load 668 rules from /usr/local/rejik3/banlists/social/urls.cache
2015-11-30 15:12:31 [13822] Load 5784 rules from /usr/local/rejik3/banlists/humor/urls.cache
2015-11-30 15:12:31 [13822] Load 21 rules from /usr/local/rejik3/banlists/video/urls.cache
2015-11-30 15:12:31 [13822] Load 477 rules from /usr/local/rejik3/banlists/games/urls.cache
2015-11-30 15:12:31 [13822] Load 1 rules from /usr/local/rejik3/banlists/js/urls.cache
2015-11-30 15:12:31 [13822] Redirector start and working (3.2.11)
Re: как осуществить доступ по времени?
date
Пн. нояб. 30 15:15:32 YEKT 2015
Пн. нояб. 30 15:15:32 YEKT 2015
Re: как осуществить доступ по времени?
Может я ошибаюсь, но у команды cp вроде два аргумента.
cp /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector.conf;
cp /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector.conf;
здесь команды cp вообще нет.поставил: с 14 до 16 должно пускать в социал
0 14 * * 1-5 root cd /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
0 16 * * 1-5 root cd /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
#
Re: как осуществить доступ по времени?
все правильно, не то вам скопировал.alexK писал(а):Может я ошибаюсь, но у команды cp вроде два аргумента.
cp /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector.conf;
здесь команды cp вообще нет.поставил: с 14 до 16 должно пускать в социал
0 14 * * 1-5 root cd /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
0 16 * * 1-5 root cd /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
#
Re: как осуществить доступ по времени?
2015-11-30 15:32:44 SOCIAL: 192.168.23.82 - http://www.vk.com/ (urls rule: vk.com)
2015-11-30 15:32:44 SOCIAL: 192.168.23.82 - http://www.vk.com/favicon.ico (urls rule: vk.com)
2015-11-30 15:32:42 [2364] Run make-cache (3.2.11)
2015-11-30 15:32:42 [2364] Make-cache finished
2015-11-30 15:32:42 [2364] Load 4522 rules from /usr/local/rejik3/banlists/banners/urls.cache
2015-11-30 15:32:42 [2364] Load 8 pattern from BANNER pcre
2015-11-30 15:32:42 [2364] Load 22283 rules from /usr/local/rejik3/banlists/porno/urls.cache
2015-11-30 15:32:42 [2364] Load 4 rules from /usr/local/rejik3/banlists/mail/urls.cache
2015-11-30 15:32:42 [2364] Load 5 pattern from MP3 pcre
2015-11-30 15:32:42 [2364] Load 668 rules from /usr/local/rejik3/banlists/social/urls.cache
2015-11-30 15:32:42 [2364] Load 5784 rules from /usr/local/rejik3/banlists/humor/urls.cache
2015-11-30 15:32:42 [2364] Load 21 rules from /usr/local/rejik3/banlists/video/urls.cache
2015-11-30 15:32:42 [2364] Load 477 rules from /usr/local/rejik3/banlists/games/urls.cache
2015-11-30 15:32:42 [2364] Load 1 rules from /usr/local/rejik3/banlists/js/urls.cache
2015-11-30 15:32:42 [2364] Redirector start and working (3.2.11)
2015-11-30 15:32:44 SOCIAL: 192.168.23.82 - http://www.vk.com/favicon.ico (urls rule: vk.com)
2015-11-30 15:32:42 [2364] Run make-cache (3.2.11)
2015-11-30 15:32:42 [2364] Make-cache finished
2015-11-30 15:32:42 [2364] Load 4522 rules from /usr/local/rejik3/banlists/banners/urls.cache
2015-11-30 15:32:42 [2364] Load 8 pattern from BANNER pcre
2015-11-30 15:32:42 [2364] Load 22283 rules from /usr/local/rejik3/banlists/porno/urls.cache
2015-11-30 15:32:42 [2364] Load 4 rules from /usr/local/rejik3/banlists/mail/urls.cache
2015-11-30 15:32:42 [2364] Load 5 pattern from MP3 pcre
2015-11-30 15:32:42 [2364] Load 668 rules from /usr/local/rejik3/banlists/social/urls.cache
2015-11-30 15:32:42 [2364] Load 5784 rules from /usr/local/rejik3/banlists/humor/urls.cache
2015-11-30 15:32:42 [2364] Load 21 rules from /usr/local/rejik3/banlists/video/urls.cache
2015-11-30 15:32:42 [2364] Load 477 rules from /usr/local/rejik3/banlists/games/urls.cache
2015-11-30 15:32:42 [2364] Load 1 rules from /usr/local/rejik3/banlists/js/urls.cache
2015-11-30 15:32:42 [2364] Redirector start and working (3.2.11)
Re: как осуществить доступ по времени?
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
0 14 * * 1-5 root cp /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
0 16 * * 1-5 root cp /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
#
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
0 14 * * 1-5 root cp /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
0 16 * * 1-5 root cp /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
#
Re: как осуществить доступ по времени?
меняем
0 14 * * 1-5 root cp /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
0 16 * * 1-5 root cp /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
на
0 14 * * 1-5 root cp -f /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
0 16 * * 1-5 root cp -f /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
0 14 * * 1-5 root cp /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
0 16 * * 1-5 root cp /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
на
0 14 * * 1-5 root cp -f /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
0 16 * * 1-5 root cp -f /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
Re: как осуществить доступ по времени?
Slava писал(а):меняем
0 14 * * 1-5 root cp /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
0 16 * * 1-5 root cp /usr/local/rejik3/redirector /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
на
0 14 * * 1-5 root cp -f /usr/local/rejik3/obed_social_off.conf /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
0 16 * * 1-5 root cp -f /usr/local/rejik3/obed_social_on.conf /usr/local/rejik3/redirector.conf; /usr/sbin/squid3 -k reconfigure
поменял:
2015-11-30 15:39:40 SOCIAL: 192.168.23.82 - http://www.vk.com/favicon.ico (urls rule: vk.com)
1448879980.100 0 192.168.23.82 TCP_MEM_HIT/200 1270 GET http://www.vk.com/favicon.ico - HIER_NONE/- text/html
2015-11-30 15:39:37 [3063] Run make-cache (3.2.11)
2015-11-30 15:39:37 [3063] Make-cache finished
2015-11-30 15:39:37 [3063] Load 4522 rules from /usr/local/rejik3/banlists/banners/urls.cache
2015-11-30 15:39:37 [3063] Load 8 pattern from BANNER pcre
2015-11-30 15:39:37 [3063] Load 22283 rules from /usr/local/rejik3/banlists/porno/urls.cache
2015-11-30 15:39:37 [3063] Load 4 rules from /usr/local/rejik3/banlists/mail/urls.cache
2015-11-30 15:39:37 [3063] Load 5 pattern from MP3 pcre
2015-11-30 15:39:37 [3063] Load 668 rules from /usr/local/rejik3/banlists/social/urls.cache
2015-11-30 15:39:37 [3063] Load 5784 rules from /usr/local/rejik3/banlists/humor/urls.cache
2015-11-30 15:39:37 [3063] Load 21 rules from /usr/local/rejik3/banlists/video/urls.cache
2015-11-30 15:39:37 [3063] Load 477 rules from /usr/local/rejik3/banlists/games/urls.cache
2015-11-30 15:39:37 [3063] Load 1 rules from /usr/local/rejik3/banlists/js/urls.cache
2015-11-30 15:39:37 [3063] Redirector start and working (3.2.11)
Re: как осуществить доступ по времени?
почему то не меняет redirector.conf