Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have the following configuration in my iptables and syslog files:

IPTABLES

-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 222 -j ACCEPT

-A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT

-A INPUT -j DROP

-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7

SYSLOG

destination d_iptables { file("/var/log/iptables/iptables.log"); };

filter f_iptables { facility(kern) and match("IN=" value("MESSAGE")) and match("OUT=" value("MESSAGE")); };

filter f_messages { level(info,notice,warn) and
                    not facility(auth,authpriv,cron,daemon,mail,news) and not 
filter(f_iptables); };
log { source(s_src); filter(f_iptables); destination(d_iptables); };

I restart syslog-ng but the logs /var/log/iptables/iptables.log never shows up.

share|improve this question
Ubuntu uses rsyslogd by default, how to enable a filter with rsyslog, see askubuntu.com/a/67484/6969. As for your issue, be sure to create the /var/log/iptables directory as syslog-ng likely does not create that directory by default. – Lekensteyn May 14 '12 at 19:13
This question appears to be abandoned and unanswered. If you solved it, please post an answer explaining how it was solved (answering your own questions is not merely permitted, but encouraged when there is no other answer that does the job). If the question no longer applies you may voluntarily delete/close it. – Eric Carvalho Jun 14 at 0:25

closed as too localized by Eric Carvalho, belacqua, Jorge Castro, Mitch, Alvar Jun 14 at 23:07

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.