summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/op_mode/show_nat_rules.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/op_mode/show_nat_rules.py b/src/op_mode/show_nat_rules.py
index 511c33610..a98fbef8c 100755
--- a/src/op_mode/show_nat_rules.py
+++ b/src/op_mode/show_nat_rules.py
@@ -41,9 +41,7 @@ if args.source or args.destination:
for idx in range(0, len(data_json)):
data = data_json[idx]
comment = data['comment']
- rule = comment.replace('SRC-NAT-','')
- rule = rule.replace('DST-NAT-','')
- rule = rule.replace(' tcp_udp','')
+ rule = int(''.join(list(filter(str.isdigit, comment))))
chain = data['chain']
if not (args.source and chain == 'POSTROUTING') or (not args.source and chain == 'PREROUTING'):
continue