diff --git a/Shorewall/lib.cli b/Shorewall/lib.cli index 186a7fcd3..0f8a467f0 100644 --- a/Shorewall/lib.cli +++ b/Shorewall/lib.cli @@ -794,14 +794,20 @@ dump_command() { heading "Log ($LOGFILE)" packet_log 20 - heading "NAT Table" - $IPTABLES -t nat -L $g_ipt_options + if qt $IPTABLES -t nat -L -n; then + heading "NAT Table" + $IPTABLES -t nat -L $g_ipt_options + fi - heading "Mangle Table" - $IPTABLES -t mangle -L $g_ipt_options + if qt $IPTABLES -t mangle -L -n; then + heading "Mangle Table" + $IPTABLES -t mangle -L $g_ipt_options + fi - heading "Raw Table" - $IPTABLES -t raw -L $g_ipt_options + if qt $IPTABLES -t raw -L -n; then + heading "Raw Table" + $IPTABLES -t raw -L $g_ipt_options + fi local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count) local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max) diff --git a/Shorewall6/lib.cli b/Shorewall6/lib.cli index 887df582d..1ccd4a340 100644 --- a/Shorewall6/lib.cli +++ b/Shorewall6/lib.cli @@ -675,11 +675,15 @@ dump_command() { heading "Log ($LOGFILE)" packet_log 20 - heading "Mangle Table" - $IP6TABLES -t mangle -L $g_ipt_options + if qt $IP6TABLES -t mangle -L -n; then + heading "Mangle Table" + $IP6TABLES -t mangle -L $g_ipt_options + fi - heading "Raw Table" - $IP6TABLES -t raw -L $g_ipt_options + if qt $IP6TABLES -t raw -L -n; then + heading "Raw Table" + $IP6TABLES -t raw -L $g_ipt_options + fi local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count) local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)