Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Currently on the private gateway there is no way to configure the NAT rules.

With this feature we can configure enable the source NAT rules (StaticNAT) service  on the VPC private gateway to redirect traffic to the VPC VMs.

Use Case:

Users might want to deploy multiple VPCs (with the same super CIDR) and/or guest Tier CIDR. So, there could be a possibility that multiple guest VM (from different VPCs) having the same IP need to reach a enterprise DC via the Private GW.

In these cases, NAT service is needed on the private GW.

Bug Reference: CLOUDSTACK-768

Design:

After Enabling NAT on private gateway interface guest, VMs in VPC reaches to enterprise network via private gateway ip address by NATing.

APIs

API Name

Parameters

Response

EnableStaticNatVpcPrivateGw enableSourceNatOnPrivateGw

privategatewayid
virtualmachineid
guestvmip

True/False

DisableStaticNatVpcPrivateGw disableSourceNatOnPrivateGw

privategatewayid

True/False

Back end script changes:

When* * user enables source NAT on the private gateway the below iptables rules get configured on the VR.

Example SNAT rule on VR for private gateway.

 - eth3 Private gateway interface

- 10.147.52.108 - private gateway ip address.

iptables -t NAT -A POSTROUTING -o eth3  -j SNAT --to-source 10.147.52.108We need a separate set of APIs for enabling NAT on a private gateway.