Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
iptables -A FORWARD -p tcp -j LOG --log-level debug
iptables -A FORWARD -p tcp -j LOG --log-level info
iptables -A INPUT -p tcp -j LOG --log-prefix ' INPUT TCP ' --log-level 7

Doesn't log anything to kern.log or syslog at all. What might cause that and how to fix that? Using Ubuntu 10.04.4 LTS

That's the contents of /etc/rsyslog.d/50-default.conf

#  Default rules for rsyslog.
#           For more information see rsyslog.conf(5) and /etc/rsyslog.conf

# First some standard log files.  Log by facility.
auth,authpriv.*         /var/log/auth.log
*.*;auth,authpriv.none      -/var/log/syslog
#cron.*             /var/log/cron.log
daemon.*            -/var/log/daemon.log
kern.*              -/var/log/kern.log
lpr.*               -/var/log/lpr.log
mail.*              -/var/log/mail.log
user.*              -/var/log/user.log

# Logging for the mail system.  Split it up so that
# it is easy to write scripts to parse these files.
#           -/var/log/
mail.warn           -/var/log/mail.warn
mail.err            /var/log/mail.err

# Logging for INN news system.
news.crit           /var/log/news/news.crit
news.err            /var/log/news/news.err
news.notice         -/var/log/news/news.notice

# Some "catch-all" log files.
    news.none;mail.none -/var/log/debug
    mail,news.none      -/var/log/messages

# Emergencies are sent to everybody logged in.
*.emerg             *

# I like to have messages displayed on the console, but only on a virtual
# console I usually leave idle.
#   news.=crit;news.=err;news.=notice;\
#   *.=debug;*.=info;\
#   *.=notice;*.=warn   /dev/tty8

# The named pipe /dev/xconsole is for the `xconsole' utility.  To use it,
# you must invoke `xconsole' with the `-file' option:
#    $ xconsole -file /dev/xconsole [...]
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
#      busy site..
    *.=notice;*.=warn   |/dev/xconsole
share|improve this question
It's possible that the log lines above never get executed because they're at the wrong place in your ruleset. Could you post the entire output of iptables -L -n -v? – MadHatter Apr 27 '12 at 9:54

Your iptables stanza defines log-level as info and your rsyslog.conf says loglevel info gets written to /var/log/messages. Can you find your iptables messages there?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.