FAQ
General
What is a Managed NAT Gateway?
The Managed Network Address Translation (NAT) gateway lets VMs inside a Virtual Data Center (VDC) reach the Internet without a public network interface. It acts as a default gateway for private networks, translating private IP addresses to a public IP address (Source NAT or SNAT) for outbound traffic, while blocking all unsolicited inbound connections from the Internet. For more information, see Overview.
Does the NAT gateway allow inbound connections from the Internet?
No. The Managed NAT Gateway performs Source NAT (SNAT) only. Connections initiated from the Internet (Destination NAT, or DNAT) are not accepted, which keeps your private VMs from being exposed to Internet threats. Return traffic for established outbound sessions works normally. If you must publish a service, use a Network Load Balancer or a public Network Interface Controller (NIC) instead.
What protocols does the NAT gateway support?
The NAT gateway supports TCP, UDP, and ICMP. When you create a SNAT rule you can also select ALL to apply the rule to all supported protocols. Target port ranges can only be applied to TCP and UDP rules.
How many private networks can I connect to a NAT gateway?
A NAT gateway supports up to six private networks (LANs).
How many NAT gateways can I have?
The default resource limit is five NAT gateways per account, and you can deploy multiple NAT gateways per VDC. If you need a higher limit, contact IONOS CLOUD Support.
Can I assign multiple public IP addresses to a NAT gateway?
Yes. You can assign multiple reserved public IP addresses to a single NAT gateway and define multiple SNAT rules, each masking traffic behind a chosen public IP address.
Is the NAT gateway highly available?
Yes. The service is deployed across multiple Availability Zones in a region, so outbound connectivity continues even if a single component fails. The service also scales automatically to accommodate growing traffic demands.
What is the difference between NAT Gateway and VPN Gateway?
Managed NAT Gateway provides outbound-only Internet access for private VMs. It translates private IP addresses to a public IP (SNAT) so VMs can reach the Internet without being reachable from it. VPN Gateway creates an encrypted tunnel between your VDC and an external network, such as an on-premises site or another cloud. Use NAT Gateway for general Internet access from private VMs; use VPN Gateway when you need secure, private connectivity between two networks.
What is the difference between NAT Gateway and Network Load Balancer?
Managed NAT Gateway handles outbound traffic only. It lets private VMs initiate connections to the Internet. Network Load Balancer distributes inbound traffic across multiple VMs and supports DNAT and port forwarding. If you must expose a service to the Internet on a specific port, use a Network Load Balancer. If you only need private VMs to reach the Internet, use NAT Gateway.
Which regions support Managed NAT Gateway?
Managed NAT Gateway is available in all IONOS CLOUD data center locations. For the full list of locations, see the Service Catalog.
How much does Managed NAT Gateway cost?
Pricing depends on your usage. For detailed pricing information, refer to the Price List. You can also estimate costs using the Cloud Price Calculator.
Setup and configuration
What permissions are required to create a NAT gateway?
Only contract owners, administrators, or users with the Create Internet Access permission can provision a NAT gateway. Other user types have read-only access and cannot provision changes.
When can I configure NAT rules?
You must provision the NAT gateway first before you can configure NAT rules. Provision your changes first, then open the NAT Rules tab and create your SNAT rules.
Does the NAT gateway automatically configure routing inside my VMs?
No. IONOS CLOUD does not inject a default route or DNS servers into the guest OS. After provisioning the NAT gateway, you must manually configure the default route and DNS resolvers inside each VM. For step-by-step instructions, see Configure the Guest OS to Use the NAT Gateway.
How do I delete a NAT gateway using the DCD?
Select the NAT Gateway element in the Workspace, delete all SNAT rules from the NAT Rules tab, then delete the element and provision your changes. For the full steps and warnings, see Delete a Managed NAT Gateway.
How do I restrict a VM to only specific Internet destinations?
When creating an SNAT rule, set a specific IP address or subnet in the Target > Subnet field. Optionally, set a port range in Target > Port range to restrict access to a specific port or range of ports. For example, to limit VMs so they can only send HTTPS traffic to a specific external API gateway, set the target subnet to 198.51.100.0/24 and both the start and end port to 443. Port ranges apply to TCP and UDP only. A VM limited this way can't resolve DNS or run the checks in Verify the configuration unless you add SNAT rules for that traffic.
Networking and routing
Can I connect a public LAN to the NAT gateway?
No. Only private LANs can be connected to a Managed NAT Gateway.
Can I change a LAN from private to public while it is connected to a NAT gateway?
No. You cannot change a LAN attribute from "private" to "public" while the LAN is connected to a Managed NAT Gateway. You must detach the LAN from the NAT gateway first.
Does the NAT gateway support IPv6?
No. The NAT gateway currently translates IPv4 addresses only. IPv6 SNAT is not supported.
Can I use the NAT gateway to expose a service to the Internet (port forwarding)?
No. The NAT gateway does not support Destination NAT (DNAT) or port forwarding. To expose a VM service on a specific public port, use a Network Load Balancer or attach a public IP address directly to the VM.
Why is DNS not working on my VM after I configure the default route?
DNS queries use UDP. If the VM's default route points to the NAT gateway, you must have a SNAT rule that permits UDP traffic. Without it, DNS queries cannot reach external resolvers. Verify that your SNAT rules include UDP and that the Source Subnet covers the VM's private IP address. You must also configure a DNS resolver address (for example, 1.1.1.1 or 8.8.8.8) inside the VM, as the NAT gateway does not provide DNS.
Access and security
How do I SSH into a VM behind the NAT gateway?
The NAT gateway is outbound-only and does not accept inbound connections. To reach a VM through Secure Shell (SSH), you need a bastion host, which is a second VM on the same LAN with its own public IP address and a firewall rule permitting inbound TCP/22. From your workstation, use SSH ProxyJump:
For a persistent ~/.ssh/config setup, see Configure the Guest OS to Use the NAT Gateway.
What if I cannot SSH into the VM at all?
Use the DCD Remote Console to log in with the credentials set at VM creation. If you do not know the password, stop the VM in the DCD and use the Reset Password action to generate a new one.
Does the NAT gateway replace the Cloud Firewall?
No. The Cloud Firewall on each VM NIC applies independently of the NAT gateway. A firewall rule that blocks a port on a NIC will still block that traffic even when routing through the NAT gateway is otherwise correct.
Maintenance
When is the NAT gateway maintenance window?
IONOS CLOUD reserves a weekly maintenance window every Monday between 02:00 and 04:00 local time of the data center hosting the service.
Is there downtime during maintenance?
A service interruption of up to five seconds may occur during the maintenance window. No further service impact is anticipated. Urgent security patches may be deployed outside the scheduled window.
Integrations
Can I monitor traffic passing through the NAT gateway?
Yes. Flow Logs capture IPv4 and IPv6 network traffic for NAT gateways. Logs are stored in an IONOS CLOUD Object Storage bucket. For more information, see Flow Logs.
Can I manage NAT gateways programmatically?
Yes. You can create, list, update, and delete NAT gateways and NAT rules through the Cloud API, and through configuration management tools such as Ansible and Terraform. For more information, see API How-Tos.
Can I use NAT Gateway with Managed Kubernetes?
Yes. Deploy your Kubernetes worker nodes in a private subnet and route outbound traffic through a NAT Gateway. This lets nodes pull container images from registries and reach external APIs without exposing them to the Internet. For a full setup example, see Use Cases.
Can private VMs use the Backup Service through a NAT gateway?
Yes. Because the VM only needs to consume services from the Internet rather than publish any, it can reach the Backup Service from behind a NAT gateway without a public NIC.
Troubleshooting
What should I check if my VM has no default route after configuration?
The guest OS configuration was not applied or did not persist across a restart. Follow the steps in Configure the Guest OS to Use the NAT Gateway and use a persistent method (Netplan, NetworkManager, or PowerShell) appropriate for your OS.
What should I check if curl times out but the route looks correct?
Open the NAT Gateway element in the DCD > NAT Rules tab and confirm that an SNAT rule exists with a Source Subnet that covers this VM's private IP address. If no rule matches, outbound traffic is not translated and is dropped.
Why does curl -4 ifconfig.me return a public IP that is not the NAT gateway IP?
The VM has its own public IP address assigned, which takes routing priority over the NAT gateway route. Detach the public IP address from the VM, or adjust the route metric so the NAT gateway route is preferred.
Why did DNS stop working after running sudo netplan apply?
On some Ubuntu and Debian images, systemd-resolved manages /etc/resolv.conf as a stub. After netplan apply, systemd-resolved regenerates the stub from the Netplan configuration. Wait a few seconds and retry. If the problem persists, run resolvectl status to confirm that the nameservers from the Netplan nameservers: block appear on the correct interface.
Last updated
Was this helpful?