Skip to content

All guidesNetwork and security guides

How to set up port forwarding (DNAT) on a cloud server

To forward a port with DNAT, you define a Virtual IP (VIP) in the izCloud panel that maps a port on your public IP to a server on your private network, and you also write a firewall rule that targets this VIP so the traffic can pass.

  • Step by step
  • 23 steps
  • 4 min
  • Reviewed by: izCloud Engineering Team
  • Last updated: 25 November 2026
In short

On izCloud, DNAT is defined as a Virtual IP on the "Firewall → Virtual IPs" page. For the external IP you can only choose public IPs assigned to you.

Before you start

  • At least one public IP assigned to your service (203.0.113.10 in this guide)
  • A server running on the private network (10.1.0.10 in this guide)
  • Permission to manage Virtual IPs. This operation exposes a server to the internet, so it counts as a critical operation and may ask for two-factor authentication

What is DNAT?

DNAT (destination address translation) changes the destination address of an incoming connection on the firewall and passes it to a server on the internal network. A user on the internet connects to 203.0.113.10, and the firewall moves the connection to the server at 10.1.0.10.

This is how a server with a private IP becomes reachable from the internet. The izCloud firewall does this with a Virtual IP (VIP) object. In the izCloud panel, VIPs are on the "Firewall → Virtual IPs" page.

How do you create a Virtual IP (VIP)?

You add a VIP on the "Infrastructure → Firewall → Virtual IPs" page. The form has the main fields and a port forwarding section.

  1. Select the service from the Active Service card at the top of the side menu.
  2. Open the "Infrastructure → Firewall → Virtual IPs" page.
  3. Click the New Virtual IP button; the "New Virtual IP" window opens.
  4. Type vip-web in the "Name" field.
  5. Select 203.0.113.10 in the "External IP Address/Range" field.
  6. Type the internal address of the server, 10.1.0.10, in the "Mapped IP Address/Range" field.
  7. Turn on "Port Forwarding".
  8. Select "Many to many" as the "Port Mapping Type".
  9. Type 443 in the "External Service Port" field.
  10. Type 443 in the "Map to IPv4 port" field.
  11. Click the "OK" button.
FieldWhat to enterRule
Namevip-webRequired
External IP Address/Range203.0.113.10Required. Chosen from the IPs assigned to your service
Mapped IP Address/Range10.1.0.10Required. The internal IP of the server
Port ForwardingOnWhen off, all ports of the external IP go to the mapped IP (static NAT)
Port Mapping TypeMany to manyIf you choose One to one, only the "Map to IPv4 port" field is shown
External Service Port443The port coming from the internet. From 1 to 65535
Map to IPv4 port443The port on the server. From 1 to 65535
The VIP form with port forwarding

Is a VIP enough on its own?

A VIP alone is not enough. You also need a firewall rule that allows the traffic. On the firewall, DNAT translates the address, and the firewall rule decides whether the traffic is allowed. Without a rule, the incoming connection is denied.

The direction of the rule is WAN → your network. You choose the VIP as the destination and the forwarded port as the service. The action is "ACCEPT".

  1. Open the "Infrastructure → Firewall → Firewall Policy" page and click the "New Rule" button.
  2. Type web-https in the "Rule Name" field.
  3. Select "ACCEPT" as the "Action".
  4. Select WAN as the "Incoming Interface (From)" and your network as the "Outgoing Interface (To)".
  5. Select all for the source and vip-web for the destination.
  6. In the "Services and Applications" step, select the HTTPS service (443/TCP).
  7. In the "NAT and Logging" step, leave the NAT switch off, then click the "Save" button on the "Summary" step.
The firewall rule for the VIP

What if the external port and the server port are different?

The external port and the server port are entered separately. This way you can publish your server's SSH port as 2222 on the internet instead of 22. Scans mostly try port 22, so a different external port reduces noise.

  1. Add a new Virtual IP and type vip-ssh in the "Name" field.
  2. Enter 203.0.113.10 as the "External IP Address/Range" and 10.1.0.10 as the "Mapped IP Address/Range".
  3. Turn on "Port Forwarding" and select "Many to many" as the "Port Mapping Type".
  4. Type 2222 in the "External Service Port" field and 22 in the "Map to IPv4 port" field.
  5. Save it and write a separate firewall rule for vip-ssh.

Example scenario: one public IP, two services

You have one public IP (203.0.113.10) and one server (10.1.0.10) on the private network. You want to publish the website on 443 and open SSH for management only from the office.

VIPExternal IP and portMapped IP and portFirewall rule source
vip-web203.0.113.10:44310.1.0.10:443all
vip-ssh203.0.113.10:222210.1.0.10:22ofis-ip (198.51.100.20)

How do you know it works?

You should be able to connect to the public IP and the external port from the internet. Run the test from outside the server network, for example from the office.

  • The VIP appears in the "Virtual IPs" list
  • The related firewall rule is "Active"
  • A connection to the external IP and port reaches the server
nc -vz 203.0.113.10 443
ssh -p 2222 kullanici@203.0.113.10

Common problems

If you see "This IP address is not allocated to your account.", choose an address assigned to your service as the External IP. Public IPs are assigned by the administrator and you can see them in the "Assigned IP Addresses" table on the "Network" page.

If you see the warning "Virtual IP could not be created", read the reason after the message. The cause is usually in the field values or in permissions.

If the VIP exists but you cannot connect, check the firewall rule. The direction must be WAN → your network, the destination must be the VIP and a service must be selected.

If the rule is correct but no reply comes back, check that the server's default gateway is the first IP of the network (10.1.0.1). The reply must return through the same firewall.

Open the port in the server's own operating system firewall and make sure the service is listening on that port.

Next guide SNAT (internet access) Let servers on the private network reach the internet with a public IP.

Frequently asked questions

Is DNAT the same as port forwarding?

Yes. Port forwarding is the port-based use of DNAT. In the izCloud panel you do it on the "Virtual IPs" page with the "Port Forwarding" option.

Can I reach several servers with one public IP?

Yes. You define a separate VIP for each server with a different external port. For example, port 2222 goes to one server and port 2223 to another.

What happens when Port Forwarding is off?

All ports that reach the external IP are passed to the mapped IP. This is called static NAT.

I created the VIP but cannot reach the server. Why?

You also need an ACCEPT rule in the WAN → your network direction, with the VIP as the destination and a service selected. Also check that the server's gateway is the first IP of the network.

Why does creating a VIP ask for two-factor authentication?

A Virtual IP exposes a server to the internet, so it counts as a critical operation. A verification code may be requested at that moment.

Publish your server

Add your VIP on the Infrastructure → Firewall → Virtual IPs page in the panel.