VPC : typo
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/0c9d5f5e Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/0c9d5f5e Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/0c9d5f5e Branch: refs/heads/vpc Commit: 0c9d5f5eb14d0aa8297a3b82286a19d397086c4f Parents: bda8fc1 Author: anthony <[email protected]> Authored: Thu Aug 2 15:26:04 2012 -0700 Committer: anthony <[email protected]> Committed: Thu Aug 2 18:59:48 2012 -0700 ---------------------------------------------------------------------- .../debian/config/opt/cloud/bin/vpc_snat.sh | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0c9d5f5e/patches/systemvm/debian/config/opt/cloud/bin/vpc_snat.sh ---------------------------------------------------------------------- diff --git a/patches/systemvm/debian/config/opt/cloud/bin/vpc_snat.sh b/patches/systemvm/debian/config/opt/cloud/bin/vpc_snat.sh index 3db9a2d..ff88354 100755 --- a/patches/systemvm/debian/config/opt/cloud/bin/vpc_snat.sh +++ b/patches/systemvm/debian/config/opt/cloud/bin/vpc_snat.sh @@ -33,6 +33,8 @@ usage() { add_snat() { logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" vpccidr=$(getVPCcidr) + sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT + sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp return $?
