Hi This is my ulog.conf file and I want to log my packet information into file /var/log/ulogd.pktlog as I have specified in options.
Code:
# GLOBAL OPTIONS
# netlink multicast group (the same as the iptables --ulog-nlgroup param)
nlgroup=1
# logfile for status messages
logfile="/var/log/ulogd.log"
# loglevel: debug(1), info(3), notice(5), error(7) or fatal(8)
loglevel=5
# socket receive buffer size (should be at least the size of the
# in-kernel buffer (ipt_ULOG.o 'nlbufsiz' parameter)
rmem=131071
# libipulog/ulogd receive buffer size, should be > rmem
bufsize=150000
# PLUGIN OPTIONS
# ulogd_BASE.so - interpreter plugin for basic IPv4 header fields
# you will always need this
plugin="/usr/local/lib/ulogd/ulogd_BASE.so"
# output plugins.
plugin="/usr/local/lib/ulogd/ulogd_LOGEMU.so"
plugin="/usr/local/lib/ulogd/ulogd_OPRINT.so"
#plugin="/usr/local/lib/ulogd/ulogd_MYSQL.so"
#plugin="/usr/local/lib/ulogd/ulogd_PGSQL.so"
#plugin="/usr/local/lib/ulogd/ulogd_SQLITE3.so"
#plugin="/usr/local/lib/ulogd/ulogd_PCAP.so"
[LOGEMU]
file="/var/log/ulogd.syslogemu"
sync=1
[OPRINT]
file="/var/log/ulogd.pktlog"
[MYSQL]
table="ulog"
pass="changeme"
user="laforge"
db="ulogd"
host="localhost"
[PGSQL]
table="ulog"
schema="public"
pass="changeme"
user="postgres"
db="ulogd"
host="localhost"
[SQLITE3]
table="ulog"
db="/path/to/sqlite/db"
buffer=200
[PCAP]
file="/var/log/ulogd.pcap"
sync=1
But after making even very general rule like,
sudo iptables -A INPUT -j ULOG --ulog0qthreshold 20 --ulog-cprange 20
I am not getting any kind of log and even not getting any file created.
What is wrong with it?