How to see the iptables logs in systemd

iptableslogssystemd

I have a system with Debian Jessie. It comes with systemd. I want to see the kernel logs for iptables.

I have a bunch of iptables and at the end I want to log what doesn't get allowed. I do it like this:

iptables -A INPUT -j LOG

With syslog I could see the iptables logs doing this:
tail -f /var/log/syslog | grep kernel
With systemd I can't find a way to see what is failing. I've been trying journalctl and journalctl -f.
journalctl alone shows a lot, doing a grep -v of what I am not interested I still can't see anything about iptables.

I also tried what is supposed to show kernel messages but I see nothing but when it started logging:

journalctl -k

I am trying to find out if iptables is a service or what, but I can't see it with:

systemctl --full list-units --type=service

I tried following this post about systemd and logs in general, but I still get no clue about how can I see iptables logs: https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs

Any hints ? thank you very much.

Best Answer

Debian Jessie does not remove syslog support by default. The old way (grepping through logs) should still work.

If you somehow accidentally removed syslog yourself, reinstall it:

apt install rsyslog
Related Question