ULOG
Приветы!
Есть Woody, 2.4.18
Пытаюсь настроить, что бы логи iptables лились через ULOG в файл.
Поставил ulog из пакета, конфиг-файл прилагается.
Инициирую iptables следующим скриптом:
#!/bin/bash
/sbin/iptables -A FORWARD -s 0.0.0.0/0.0.0.0 -d 0.0.0.0/0.0.0.0 -j ULOG --ulog-nlgroup 5 --ulog-prefix "My traffic:"
/sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 0.0.0.0/0.0.0.0 -j SNAT --to-source xxx.xxx.xxx.xxx
Смотрю lsmod - ipt_ULOG есть. Смотрю iptables -L - есть (см. ниже)
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ULOG all -- anywhere anywhere ULOG copy_range 0 nlgroup 5 prefix `My traffic:' queue_threshold 1
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
А в файл - так ничего и не капает! При этом, если в той же строчке заменить действи ULOG на LOG - в syslog нормально всё валится.
Что я делаю не так?
Спасибо! Особенно за содержательные ответы - ну очень нужно.
==
С уважением, Денис
#####################################################################
# GLOBAL OPTIONS ######################################################################
# netlink multicast group (the same as the iptables --ulog-nlgroup param) nlgroup 5
# logfile for status messages
logfile /var/log/ulogd.log
# loglevel: notice, warnings, error and fatal
loglevel 1
######################################################################
# PLUGIN OPTIONS ######################################################################
# We have to configure and load all the plugins we want to use
# general rules:
# 1. specify the options FIRST, then load the plugin
# 2. interpreter plugins have to precede output plugins
#
# ulogd_BASE.so - interpreter plugin for basic IPv4 header fields
# you will always need this
plugin /usr/lib/ulogd/ulogd_BASE.so
#
# ulogd_LOGEMU.so - simple syslog emulation target
#
# where to write to
syslogfile /var/log/ulogd.syslog
# do we want to fflush() the file after each write?
syslogsync 1
# load the plugin
plugin /usr/lib/ulogd/ulogd_LOGEMU.so
#
# ulogd_OPRINT.so: file for packet dumping
#
# NOTE: This may or may not be broken. -DS
#
# where to write the log
dumpfile /var/log/ulogd.pktlog
# load the plugin (remove the '#'if you want to enable it #plugin /usr/lib/ulogd/ulogd_OPRINT.so
#
# ulogd_MYSQL.so: optional logging into a MySQL database
#
# database information
#mysqltable ulog
#mysqlpass bar
#mysqluser foo
#mysqldb ulogd
#mysqlhost localhost
# load the plugin (remove the '#' if you want to enable it) #plugin /usr/lib/ulogd/ulogd_MYSQL.so
Reply to: