Page MenuHomeVyOS Platform

The command "show log firewall name <name>" does not show the expected log entries
Closed, ResolvedPublic

Description

I think the expected behavior of the command show log firewall name <name> is, that it shows any log entries created by the default-action and created by the rules of the specific firewall.
Instead the command shows the default-action log entries of all firewalls that have set enable-default-log.
It seems that the regular expression is not correct.

diff --git a/templates/show/log/firewall/name/node.tag/node.def b/templates/show/log/firewall/name/node.tag/node.def
index 4e71fa0..7431f8a 100644
--- a/templates/show/log/firewall/name/node.tag/node.def
+++ b/templates/show/log/firewall/name/node.tag/node.def
@@ -1,5 +1,5 @@
 help: Show log for a specified firewall
 allowed: local -a ARR=$(cli-shell-api -- listEffectiveNodes firewall name)
           echo "${ARR[@]//\'/}"
-run: cat $(printf "%s\n" /var/log/messages* | sort -nr ) | egrep "\[$5-[0-9]+|default-[ADR]\]"
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr ) | egrep "\[$5-([0-9]+|default)-[ADR]\]"

Details

Difficulty level
Easy (less than an hour)
Version
1.1.7
Why the issue appeared?
Implementation mistake

Event Timeline

could you please confirm if it is working for you in the latest buid (starting from 26 juli) http://dev.packages.vyos.net/iso/current/amd64/

syncer moved this task from Need Triage to Backlog on the VyOS 1.1.x board.
syncer edited subscribers, added: Maintainers; removed: syncer, UnicronNL.

@UnicronNL can we fix this for 1.1.8 too?

syncer triaged this task as Normal priority.
syncer moved this task from Need Triage to Backlog on the VyOS 1.2 Crux board.
syncer added a subscriber: syncer.

Moved to backlog and assigned to you

syncer moved this task from Needs Triage to Backlog on the VyOS 1.1.x (1.1.8) board.

Added to 1.1.8 backlog

UnicronNL moved this task from Backlog to Finished on the VyOS 1.1.x (1.1.8) board.

falso fixed in 1.1.8