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/41723551 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/41723551 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/41723551 Branch: refs/heads/feature/systemvm-persistent-config Commit: 41723551c7c3124ea9d9464be4783d07654b4b7e Parents: 68ed379 Author: Ian Southam <[email protected]> Authored: Fri Feb 6 16:34:38 2015 +0100 Committer: Ian Southam <[email protected]> Committed: Fri Feb 6 16:34:38 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/41723551/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():
