Bug 1297162 - log option does not appear to work with a forward-port rich rule
log option does not appear to work with a forward-port rich rule
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: firewalld (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Thomas Woerner
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-09 21:06 EST by Sam Varshavchik
Modified: 2016-07-15 11:59 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-15 11:59:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sam Varshavchik 2016-01-09 21:06:13 EST
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):

firewalld-0.3.14.2-4.fc23.noarch

How reproducible:

always

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.

Actual results:

Nothing gets logged to /var/log/messages

Expected results:

According to the firewalld.richlanguage man page, I can expect to have the connection logged via syslog:

   Log
           log [prefix="prefix text"] [level="log level"] [limit value="rate/duration"]

       Log new connection attempts to the rule with kernel logging for example
       in syslog. 

Additional info:

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.
Comment 1 Thomas Woerner 2016-07-15 11:59:14 EDT
This has been fixed with firewalld version 0.4.1.2.

Note You need to log in before you can comment on or make changes to this bug.