About
What is SNAT?
Source Network Address Translation (SNAT) is a technique used in networking to modify the source address of packets as they pass through a router or firewall. This is commonly used to allow multiple VMs on a local network to share a single public IP address when accessing the internet.
Is it necessary to set the SNAT?
By default SNAT is already configured on your VDC. However, if you have multiple Public IPs and you want your VM to use certain Public IP for outgoing according to your VM or application, you need to configure SNAT.
Preparation
Before proceed to use this guide, you must ensure:
- You have deployed at least 1 Virtual Machine in your VDC.
- You have multiple public IPs.
- You know what connection or port or public IP you want to allow.
Guide
1. Login to vCloud Director using your account. Click on your DC.
2. You'll see this page, hit Edges on left pane.
3. Click DC_XXXXXX.
4. After that go to the NAT> NEW
5. Next, fill the Name box and fill in the following informations:
- External IP: Is your public IP VM.
- Internal IP: Is your private/LAN IP VM that you want to change the source IP.
- NAT Action: Choose SNAT
- Priotity: 0
6. The SNAT successfully created.
7. To test the SNAT configuration you can check from inside of your VM:
Before: (This SNAT is using the default public IP)
After:
Now your VM's Public IP will be read as using a different IP from the public connection, not using your default public IP.