Red Hat Bugzilla – Bug 1297162
log option does not appear to work with a forward-port rich rule
Last modified: 2016-07-15 11:59:14 EDT
Description of problem:
The "log" option appears to be completely ignored for the "forward-port" rich rule. There's no error, add-rich-rule succeeds, but a logging iptables rule does not get created.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. The default rsyslog.conf in fedora logs all *.info messages to /var/log/messages
2. Add a forward-port rule with the "log" option. For example:
firewall-cmd --add-rich-rule 'rule family="ipv4" forward-port port="8369" protocol="tcp" to-port="80" to-addr="192.168.0.2" log level="info" limit value="1/h"'
3. Use telnet, appropriately, to establish a new connection that uses this NAT rule.
Nothing gets logged to /var/log/messages
According to the firewalld.richlanguage man page, I can expect to have the connection logged via syslog:
log [prefix="prefix text"] [level="log level"] [limit value="rate/duration"]
Log new connection attempts to the rule with kernel logging for example
Examining what firewalld does with iptables, it doesn't look like there's any iptables LOGGING entry. I see the forward port rule in the nat table, and that's pretty much it.
This has been fixed with firewalld version 0.4.1.2.