Chapter VI: 6.3 NAT Gateway
NAT Gateway servers as a connection between private networks and the internet, providing additional security for private networks. This guide will discuss the steps to add a NAT Gateway and configure it by adding and removing Floating IPs on the Cloudeka Portal service.
6.3.1 Create NAT Gateway
Here are the steps to create a NAT Gateway:
- On the Network menu, select the VPC tab and click the Create VPC button.
Image 6.25 Create NAT Gateway (a)
- Select the Wizard Expert tab and fill in all the fields to create the NAT Gateway.
Image 6.26 Create NAT Gateway (b)
Table 6.10 Create NAT Gateway
Column | Description |
---|---|
Name | The name of the NAT Gateway configuration that is created. |
Description | Additional information regarding the created NAT Gateway. |
Billing Type | Determining the IP address to be used as the source address used by the NAT Gateway. THere are two columns that must be filled in: a.IP Prefix is the network address used in the IP address subnet to be used. b.Network Size is the number of IP address used written in CIDR notaion of the enterded IP Prefix. |
Configuration IP Range | Enter Private IP Address also the subnetmask, The Internet Assigned Number Authority (IANA) has assigned several address ranges to be used by private networks. Address ranges to be use by private network are: - Class A: 10.0.0.0 to 10.255.255.255 - Class B: 172.16.0.0 to 172.31.255.255 - Class C: 192.168.0.0 to 192.168.255.255 An IP address within these ranges is therefore considered non-routable, as it is not unique. Any private network that needs to use IP addresses internally can use any address within these ranges without any coordination with IANA or an Internet registry. Addresses within this private address space are only unique within a given private network. |
- After filling in all the fields, click the Create NAT Gateway button and wait until the process is complete.
Image 6.27 Create NAT Gateway (c)
Image 6.28 Create NAT Gateway (d)
- A notification will appear stating that “NAT Gateway [NAT Gateway name] has been successfully created” indicating that the NAT Gateway has been successfully created."
Image 6.29 Create NAT Gateway (e)
6.3.2 Configuration NAT Gateway: Add Floating IP
Here are the steps to add a Floating IP to be used on the NAT Gateway:
- On the Network menu, select the NAT Gateway tab and click Configuration in the Action column.
Image 6.30 Add Floating IP (a)
- Choose the Floating IP tab and then click Create Floating IP.
Image 6.31 Add Floating IP (b)
- Select the network to be used and click Create to continue the process.
Image 6.32 Add Floating IP (c)
Image 6.33 Add Floating IP (d)
- Notification will appear “Floating IP [floating ip name] has been successfully created” indicating that the Floating IP has been successfully added to the NAT Gateway.
Image 6.34 Add Floating IP (e)
6.3.3 Configuration NAT Gateway: Delete Floating IP
Before removing Floating, ensure that you have released the Static Route configuration and NAT configuration on the NAT Gateway. Here are the steps to remove an unused Floating IP:
- On the Network menu select the NAT Gateway tab and in the Actions column click Configuration.
Image 6.35 Delete Floating IP (a)
- Select the Floating IP tab in the Action column click the Delete button.
Image 6.36 Delete Floating IP (b)
- There is a confirmation window press the Confirm key to continue the Floating IP removal process on the NAT Gateway.
Image 6.37 Delete Floating IP (c)
Image 6.38 Delete Floating IP (d)
- The notification “Floating IP [floating IP name] has been successfully deleted” indicates that the Floating IP has been successfully removed from the NAT Gateway.
Image 6.39 Delete Floating IP (e)
6.3.4 Configuration NAT Gateway: Add Static Route
To add static routes to a NAT Gateway, you must create a virtual machine in the Instance menu that uses a VPC accompanied by a NAT Gateway. Here are the steps to add a Static Route to the NAT Gateway:
- On the Network menu select the NAT Gateway tab. In the Action column click Configuration on the NAT Gateway list to configure.
Image 6.40 Add Static Route (a)
- Select the Static Route tab and click Create Static Route.
Image 6.41 Add Static Route (b)
- The Create Static Route form displays the contents of all available columns in the form.
Image 6.42 Add Static Route (c)
Table 6.11 Static Route Form
Column | Description |
---|---|
Destination CIDR | Configuration that specifies the destination network to be translated by the NAT Gateway. |
Nexthop | Configure by adding a Gateway IP address that is useful for forwarding data packets to destinations. |
Description | Configuration description of the static route created. |
- If all forms are completed click the Create button and wait for the process to complete.
Image 6.43 Add Static Route (d))
Image 6.44 Add Static Route (e)
- Static routes are available and can be used.
Image 6.45 Add Static Route (f)
6.3.5 Configuration NAT Gateway: Delete Static Route
Here are the steps to remove the static route:
- On the Network menu select the NAT Gateway tab and click the Configure button.
Image 6.46 Delete Static Route (a)
- On the Static Route tab in the Action column click the Delete button.
Image 6.47 Delete Static Route (b)
- The notification displays click Confirm to continue the process and wait for the process to complete and the static route configuration to be deleted.
Image 6.48 Delete Static Route (c)
Image 6.49 Delete Static Route (d)
- The “NAT [NAT name] has been successfully created” notification displays that NAT successfully created.
6.3.6 Configuration NAT Gateway: Add NAT
To add NAT in NAT Gateway, make sure you have added a Floating IP. There are two types of NAT available, namely SNAT and DNAT. If you choose the SNAT type, then the fields in the Create NAT form are filled in as follows:
Image 6.50 SNAT Type
Table 6.11 Type SNAT
Column | Description |
---|---|
Destination Address | The destination IP Address. |
Translation Address | Changing the source IP address of data packets as they pass through the router so that the data packets can pass through the network easily and securely. |
Description | Explanation of the SNAT configuration to be created. |
While selecting the DNAT type, the Create NAT form column is filled in:
Image 6.51 DNAT Type
Table 6.12 Type DNAT
Column | Description |
---|---|
Destination CIDR | The types of protocols used in data packets are: a. TCP b. UDP |
Translation Port | The port used as the destination address after the DNAT process. |
Destination Port | Port of the destination address before DNAT processing. |
Destination Address | Specifies the destination IP Address of the data packet before DNAT processing. |
Translation Address | Specifies the IP address used as the destination address after the DNAT process. |
Description | Explanation of NAT configuration. |
Here are the steps to add NAT to the NAT Gateway:
- On the Network menu on the NAT Gateway tab click Configuration in the Action column.
Image 6.52 Add NAT (a)
- Select the NAT tab and click Create NAT.
Image 6.53 Add NAT (b)
- Select the SNAT type.
Image 6.54 Add NAT (c)
- Fill in the IP address in the Destination Address.
Image 6.55 Add NAT (d)
- Select Translation Address.
Image 6.56 Add NAT (e)
- Fill in the Description column and click the Create button and wait for the process to complete.
Image 6.57 Add NAT (f)
Image 6.58 Add NAT (g)
- The “NAT [NAT name] has been successfully created” notification displays that NAT successfully created.
Image 6.59 Add NAT (h)
6.3.7 Configuration NAT Gateway: Delete NAT
Here are the steps to delete NAT configurations in NAT Gateway:
- On the Network menu, select the NAT Gateway tab, and then click Configuration.
Image 6.60 Delete NAT (a)
- Select the NAT tab, click Delete in the Action column, and wait until the process is complete.
Image 6.61 Delete NAT (b)
- A confirmation window will appear, click Confirm to proceed with the process.
Image 6.62 Delete NAT (c)
Image 6.63 Delete NAT (d)
- The “NAT [natname] has been successfully deleted” notification displays that nat was deleted.
Image 6.64 Delete NAT (e)
6.3.8 Delete NAT Gateway
Before deleting the NAT Gateway, make sure to release:
a. Virtual Machine on the Instance Name.
b. NAT Gateway configure: Floating IP, Static Route, dan NAT.
Here are the steps to delete the NAT Gateway:
- On the Network menu select the VPC tab and then click Delete in the Action Column.
Image 6.65 Delete NAT Gateway (a)
- A confirmation window will appear, click Confirm to proceed with the process.
Image 6.66 Delete NAT Gateway (b)
- A notification will appear stating that “NAT Gateway VPC-Router has been successfully deleted” indicating that the NAT Gateway has been successfully deleted."
Image 6.67 Delete NAT Gateway (c)