[ https://issues.apache.org/jira/browse/CLOUDSTACK-9495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15495857#comment-15495857 ]
ASF GitHub Bot commented on CLOUDSTACK-9495: -------------------------------------------- Github user murali-reddy commented on the issue: https://github.com/apache/cloudstack/pull/1666 @karuturi i did not change the logic of how and what iptables rules were added in the original patch. I just stream lined rule action deny/allow logic for all the protocols. I have updated the patch as there is one more egress rule bug "CLOUDSTACK-9495: Egress rules functionalty broken when protocol=all specified". Now iptable rules are only inserted in the front. > Egress rules functionalty broken when protocol=all specified > ------------------------------------------------------------ > > Key: CLOUDSTACK-9495 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9495 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Affects Versions: 4.6.2, 4.7.1, 4.8.0, 4.9.0 > Reporter: Murali Reddy > Assignee: Murali Reddy > Priority: Critical > Fix For: 4.10.0.0, 4.9.1.0, 4.8.2.0 > > > Egress rules handling in > systemvm/patches/debian/config/opt/cloud/bin/configure.py, class CsAcl, > add_rule() has below logic for handling protocol > {code} > if rule['protocol'] != "all": > fwr += " -s %s " % cidr + \ > " -p %s " % rule['protocol'] + \ > " -m %s " % rule['protocol'] + \ > " --dport %s" % rnge > {code} > There is no else block to handle case when protocol in 'all' in which case > CIDR never gets passed to the iptables command, hence resulting in accept all > rule FW_EGRESS_RULES chain. > To reproduce the issue just give any cidr in the guest subnet, for e.g. > 10.1.1.27/31 and protocol all and see the result in FW_EGRESS_RULES of the > filter table, you will see accept all rule. -- This message was sent by Atlassian JIRA (v6.3.4#6332)