diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 9a780f341..b4bde3b41 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -331,6 +331,7 @@ sub add_rule($$) $rule .= " -m comment --comment \"$comment\"" if $comment; if ( $chainref->{loopcount} || $chainref->{cmdcount} ) { + $rule =~ s/"/\\"/g; add_command $chainref , qq(echo "-A $chainref->{name} $rule" >&3); } else { push @{$chainref->{rules}}, $rule;