From 5cb9b84bd9ce909460d8da7f039d9371143ede6c Mon Sep 17 00:00:00 2001 From: l0crian1 Date: Tue, 21 May 2024 09:35:29 -0400 Subject: T6375: Fix/Update NAT logging Fixed broken logging for "show log nat" Added the following commands: show log nat source show log nat source rule show log nat destination nat show log nat destination nat rule show log nat static show log nat static rule --- op-mode-definitions/show-log.xml.in | 50 ++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in index e13270364..c3aa324ba 100644 --- a/op-mode-definitions/show-log.xml.in +++ b/op-mode-definitions/show-log.xml.in @@ -464,12 +464,56 @@ journalctl --no-hostname --boot --unit lldpd.service - + Show log for Network Address Translation (NAT) - egrep -i "kernel:.*\[NAT-[A-Z]{3,}-[0-9]+(-MASQ)?\]" $(find /var/log -maxdepth 1 -type f -name messages\* | sort -t. -k2nr) - + + + + Show NAT destination log + + journalctl --no-hostname --boot -k | egrep "\[DST-NAT-[0-9]+\]" + + + + Show NAT destination log for specified rule + + journalctl --no-hostname --boot -k | egrep "\[DST-NAT-$6\]" + + + + + + Show NAT source log + + journalctl --no-hostname --boot -k | egrep "\[SRC-NAT-[0-9]+(-MASQ)?\]""" + + + + Show NAT source log for specified rule + + journalctl --no-hostname --boot -k | egrep "\[SRC-NAT-$6(-MASQ)?\]" + + + + + + Show NAT static log + + journalctl --no-hostname --boot -k | egrep "\[STATIC-(SRC|DST)-NAT-[0-9]+\]" + + + + Show NAT static log for specified rule + + journalctl --no-hostname --boot -k | egrep "\[STATIC-(SRC|DST)-NAT-$6\]" + + + + + journalctl --no-hostname --boot -k | egrep "\[(STATIC-)?(DST|SRC)-NAT-[0-9]+(-MASQ)?\]" + Show log for Neighbor Discovery Protocol (NDP) Proxy -- cgit v1.2.3