
Untangle - установка ntop, phpsysinfo, imspector, squid, monit, rsyslog, sqstat, sarg |
![]() |
![]() |
![]() |
Автор: Administrator | ||||||||||||
28.09.10 10:14 | ||||||||||||
Установка ntop, phpsysinfo, imspector, squid, monit, rsyslog, sqstat, sarg на Untangle (перевод с дополнениями)
Оф. инструкция по настройке Untangle ТУТ
rm /etc/ssh/sshd_not_to_be_run && /etc/init.d/ssh start /etc/init.d/ssh restart ssh 192.168.0.15 Настройка – Сеть - Advanced - Packat Filter - Accept SSH traffic from all interfaces - ставим галочку После этих манипуляций, на сервер Untangle можно "заходить" по SSH
a. Правим меняем на
a) можно промустить b) Раскоментировать все репозитарии в /etc/apt/sources.list c) Очищаем и обновляем кэш d) Загружаем и устанавливаем NTOP e) Вводим пароль администратора: admin password ntop -A
f) Cконфигурируем nTOP интерфейсы (Я использовал два интерфейса) echo 'USER="ntop"\nINTERFACES="eth0,eth1"' >| /var/lib/ntop/init.cfg
g) Сконфигурируем nTOP TCP port 4000 echo 'GETOPT="-w 4000"' >> /etc/default/ntop
h) Стартуем nTOP /etc/init.d/ntop start
i) Проверяем nTOP I, слушает ли он TCP port 4000 lsof -i | grep ntop Видим результат: ~ # lsof -i | grep ntop ntop 16337 ntop 1u IPv4 105625 TCP *:4000 (LISTEN)
j) Конфигурируем "Pcket Filter" для nTOP (Packet Filter) Config - Networking - Advanced - Packet Filter Port:4000 & Destination Local
Ниже снимаем галку с «Block all local traffic» С этой галкой не работает форвардиг пакетов для SQUID k) Проверяем NTOP 4. Устанавливаем PHPSYSINFO
/etc/apache2/sites-available/uvm
Разрешаем PHP and CGI файлы. Меняем: <Directory /var/www> FileETag MTime Size </Directory> на <Directory /var/www> Options +ExecCGI AddHandler cgi-script .cgi AddHandler fcgid-script .php FCGIWrapper /usr/lib/cgi-bin/php5 .php FileETag Mtime Size </Directory>
b) Устанавливаем PhpSysInfo apt-get install phpsysinfo
В правом верхнем углу можно изменить локализацию на русскую.
5.Установка Imspector У меня не заработал. a) Загружаем и устанавливаем apt-get install make build-essential openssl libssl-dev
cd /tmp c) Создаем директорию mkdir /etc/imspector
d) создаем Dependency files Создаем скрипт для старта: /etc/init.d/imspector и добовляем в него:
#! /bin/sh # IMspector startup PATH=/sbin:/bin:/usr/sbin:/usr/bin echo "Starting IMspector..."
Далее: imspector -c /etc/imspector/imspector.conf chmod 755 /etc/init.d/imspector chmod +x imspector update-rc.d imspector defaults mv /usr/etc/imspector/imspector.conf /etc/imspector/imspector.conf mv /usr/etc/imspector/badwords.txt /etc/imspector/badwords.txt mv /usr/etc/imspector/acl.txt /etc/imspector/acl.txt /etc/init.d/imspector Копируем /tmp/imspector-0.9/contrib.imspector.cgi в /usr/share/phpsysinfo/
e) Рестартуем Apache: /etc/init.d/apache2 restart f) Проверяем работу Imspector: http://192.168.0.15/phpsysinfo/imspector.cgi g) Cоздаем правило доступа и правило переадресации для Imspector Configure a port forwarding in UT for all or users you want to monitor фильтр пакетов Port:1863 & Destination Local Port:16667 & Destination Local
Destination Port: 1863 (For MSN, Yahoo, Gmail, etc) Protocol:TCP New Destination: UT Internal eth1 IP New Port. 16667
6. Усатанавливаем Squid Проблема в том, что трафик идущий через Squid не фильтруеться веб фильтром! Все политики по запрету сайтов, видео, музыки, работать не будут. Я поставил Squid и SARG для сбора статистики. apt-get install squid b) Конфигурируем squid acl all src all c) Рестартуем squid: /etc/init.d/squid reestart Configure a port forwarding in UT for all or users you want to monitor
На примере IP 192.168.0.18 вместо 192.168.0.15
7. Установка Monit (настройка доп. параметров для уведомления)
set daemon 120 set logfile /var/log/uvm/monit.log set mailserver domine.lan port 25 username " Данный адрес e-mail защищен от спам-ботов, Вам необходимо включить Javascript для его просмотра. " password " PaSsWoRd " set alert Данный адрес e-mail защищен от спам-ботов, Вам необходимо включить Javascript для его просмотра. only on { timeout, nonexist, connection } set alert Данный адрес e-mail защищен от спам-ботов, Вам необходимо включить Javascript для его просмотра. only on { timeout, nonexist, connection } set httpd port 2812 and use address localhost allow 192.168.0.0/24 allow root:PaSsWoRd allow localhost #MONITOR APACHE check process apache with pidfile /var/run/apache2.pid start program = "/etc/init.d/apache2 start" stop program = "/etc/init.d/apache2 stop" if failed host 192.168.0.18 port 80 protocol http for 2 cycles then restart if 5 restarts within 10 cycles then timeout
#MONITOR NTOP check process ntop with pidfile /var/run/ntop.pid start program = "/etc/init.d/ntop start" stop program = "/etc/init.d/ntop stop" if failed host 192.168.0.15 port 4000 then restart # if 5 restarts within 5 cycles then timeout
#MONITOR SSHD check process sshd with pidfile /var/run/sshd.pid start program "/etc/init.d/ssh start" stop program "/etc/init.d/ssh stop" if failed port 22 protocol ssh for 2 cycles then restart if 5 restarts within 10 cycles then timeout
#MONITOR SQUID check process squid with pidfile /var/run/squid.pid start program "/etc/init.d/squid start" stop program "/etc/init.d/squid stop" if failed host 192.168.0.15 port 55555 then restart if 5 restarts within 10 cycles then timeout
#MONITOR IMSPECTOR check process imspector with pidfile /var/run/imspector.pid start program "/etc/init.d/imspector start" stop program "/etc/init.d/imspector stop" if failed host 192.168.0.15 port 16667 then restart if 5 restarts within 10 cycles then timeout
b) Рестартуем монитор /etc/init.d/untangle-vm
8. Устанваливаем TCPTRACK & DSNIFF apt-get install tcptrack apt-get install dsniff a) UT 7.3 уже имеються iftop & jnettop 9.Устанавливаем Rsyslog оповещения (Настравиваем нужную для нас информацию в оповещениях) Credits for Bigdessert a) Вносим изменения в /etc/rsyslog.conf
Добавляем:
Под # provides UDP syslog reception, раскоментировать следующие файлы: #$ModLoad imudp #$UDPServerRun 514
##Обратите внимание, SMTP-сервер должен иметь возможность ретрансляции почты! ##
$ActionMailSMTPServer localhost $ActionMailSMTPPort 25 $ActionMailFrom Данный адрес e-mail защищен от спам-ботов, Вам необходимо включить Javascript для его просмотра. $ActionMailTo Данный адрес e-mail защищен от спам-ботов, Вам необходимо включить Javascript для его просмотра. $template mailSubject,"Untangle Alert On Server" $template mailBody,"RSYSLOG Alert\r\nmsg='%msg%'" $ActionMailSubject mailSubject if $syslogtag contains 'Intrusion_Prevention' then :ommail:;mailBody
b) Рестартуем rsyslog: /etc/init.d/rsyslog restart
В административной панели вкдючаем Монитор и вписываем localhost , port 514
10. Устанавливаме Sqstat for Squid (Live Stats) Просмотр акривных сессий в реальном времени через Squid сd /tmp cd /tmp/sqstat-1.20 Правим - config.inc.php меняем Squid IP:127.0.0.1 cd /tmp/
11. Удаленный доступ к базе данных Untangle (Allow remote access to UT database) Description: Pass Postgres c) Stop postgress services: /etc/init.d/untangle-vm stop d) Edit file: /etc/postgresql/8.3/main/postgresql.conf with listen_addresses = '*' e) Edit file: /etc/postgresql/8.3/main/pg_hba.conf with host all all 0.0.0.0/0 trust f) Just restart the services. /etc/init.d/postgresql-8.3 start g) Get a copy of pgAdmin from www.pgadmin.org and connect using the following: Name: Untangle 12. Установка SARG (статистика посещаемости) Установим SARG apt-get install sarg Готовый конфиг /etc/squid/sarg.conf ТУТ По SARG читаем ТУТ проверяем http://192.168.0.15/squid-reports/
оригинал: ТУТ |
||||||||||||
Последнее обновление 04.12.10 15:58 |
