Debian Codegraph @

ntc_templates/templates/ubiquiti_edgerouter_show_nat_rules.textfsm

raw
1 Value RULE (\d+)
2 Value TYPE (\S+)
3 Value INTERFACE (\S+)
4 Value SRC_ADDRESS ((\d+\.\d+\.\d+\.\d+((/\d+)?))|---)
5 Value DEST_ADDRESS ((\d+\.\d+\.\d+\.\d+((/\d+)?))|---)
6 Value PROTOCOL (tcp|udp|icmp|all|tcp_udp|---)
7 Value SRC_PORT (\S+)
8 Value DEST_PORT (\S+)
9
10 Start
11 ^Type Codes: SRC - source, DST - destination, MASQ - masquerade
12 ^\s+X at the front of rule implies rule is excluded\s*$$
13 ^(rule\s+type\s+intf\s+translation)\s*$$
14 ^([-\s]+)$$
15 ^${RULE}\s+${TYPE}\s+${INTERFACE}\s+daddr\s${SRC_ADDRESS}\sto\s${DEST_ADDRESS}\s*$$
16 ^${RULE}\s+${TYPE}\s+${INTERFACE}\s+saddr\s${DEST_ADDRESS}\sto\s${SRC_ADDRESS}\s*$$
17 ^\s+proto\-${PROTOCOL}\s+(dport|sport)\s(${SRC_PORT}\sto\s${DEST_PORT}|ANY)\s*$$ -> Record
18 ^. -> Error