iptables needs -m comment for --comment to work

This commit is contained in:
Andreas Lutro 2015-10-27 18:20:37 +01:00
parent a44c8d8dab
commit 170ea7c50d

View file

@ -261,6 +261,9 @@ def build_rule(table='filter', chain=None, command=None, position='', full=None,
del kwargs[multiport_arg]
if 'comment' in kwargs:
if '-m comment' not in rule:
rule.append('-m comment')
rule.append('--comment "{0}"'.format(kwargs['comment']))
del kwargs['comment']