|
@@ -91,7 +91,8 @@ Both formats, positional and keyword arguments, can be used
|
|
|
interchangeably.
|
|
|
|
|
|
Available matches:
|
|
|
- action: accept, drop or forward
|
|
|
+ action accept, drop or forward
|
|
|
+ forwardtype internal or external (only with action=forward)
|
|
|
dst4 synonym for dsthost
|
|
|
dst6 synonym for dsthost
|
|
|
dsthost IP, network or hostname
|
|
@@ -99,6 +100,7 @@ Available matches:
|
|
|
www.example.com, fd00::/8)
|
|
|
dstports port or port range
|
|
|
(e.g. 443 or 1200-1400)
|
|
|
+ srcports port in input (only with action=forward)
|
|
|
icmptype icmp type number (e.g. 8 for echo requests)
|
|
|
proto icmp, tcp or udp
|
|
|
specialtarget only the value dns is currently supported,
|
|
@@ -146,15 +148,17 @@ def rules_list_table(vm):
|
|
|
:param vm: VM object
|
|
|
:return: None
|
|
|
'''
|
|
|
- header = ['NO', 'ACTION', 'HOST', 'PROTOCOL', 'PORT(S)',
|
|
|
+ header = ['NO', 'ACTION', 'FORWARD TYPE', 'HOST', 'PROTOCOL', 'SRCPORT', 'PORT(S)',
|
|
|
'SPECIAL TARGET', 'ICMP TYPE', 'EXPIRE', 'COMMENT']
|
|
|
rows = []
|
|
|
for (rule, rule_no) in zip(vm.firewall.rules, itertools.count()):
|
|
|
row = [x.pretty_value if x is not None else '-' for x in [
|
|
|
rule.action,
|
|
|
+ rule.forwardtype,
|
|
|
rule.dsthost,
|
|
|
rule.proto,
|
|
|
rule.dstports,
|
|
|
+ rule.srcports,
|
|
|
rule.specialtarget,
|
|
|
rule.icmptype,
|
|
|
rule.expire,
|