Add network stats for isalated networks
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/33f5c2b0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/33f5c2b0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/33f5c2b0 Branch: refs/heads/feature/systemvm-persistent-config Commit: 33f5c2b00af3d9fc8729994608e0ce12f50119cd Parents: e9bbc64 Author: Ian Southam <isout...@schubergphilis.com> Authored: Fri Feb 6 16:34:38 2015 +0100 Committer: wilderrodrigues <wrodrig...@schubergphilis.com> Committed: Mon Feb 16 16:08:45 2015 +0100 ---------------------------------------------------------------------- systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/33f5c2b0/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py ---------------------------------------------------------------------- diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py index df6fdc7..80dfcdc 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py @@ -355,6 +355,13 @@ class CsIP: if self.get_type() in ["control"]: self.fw.append(["filter", "", "-A FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT"]) self.fw.append(["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 3922 -m state --state NEW -j ACCEPT" % self.dev]) + self.fw.append(['', 'front', '-A FORWARD -j NETWORK_STATS']) + self.fw.append(['', 'front', '-A INPUT -j NETWORK_STATS']) + self.fw.append(['', 'front', '-A OUTPUT -j NETWORK_STATS']) + self.fw.append(['', '', '-A NETWORK_STATS -i eth0 -o eth2']) + self.fw.append(['', '', '-A NETWORK_STATS -i eth2 -o eth0']) + self.fw.append(['', '', '-A NETWORK_STATS -o eth2 ! -i eth0 -p tcp']) + self.fw.append(['', '', '-A NETWORK_STATS -i eth2 ! -o eth0 -p tcp']) def fw_vpcrouter(self): if not self.config.is_vpc():