Skip to main content

Set up access to and from the Internet

Last update:

For the cloud server, cloud load balancer, and Managed Database cluster, you can configure access to and from the Internet:

If your device only needs internet access without access from the internet, you can set it up through a cloud router.

Set up access to and from the Internet via a public IP address

To configure Internet access to and from the Internet for devices on a private subnet, you must connect the subnet to a cloud router with Internet access and connect a public IP address to the device. The cloud router acts as a 1:1 NAT via the external IP address that is allocated when the router is connected to the Internet: it organizes Internet access from the private subnet and handles incoming traffic packets for the public IP addresses.

You can connect a public IP address when creating a cloud server, creating a cloud load balancer, creating a Managed Database cluster (example for PostgreSQL), and after creation.

The device must be on a private subnet or a global router subnet that meets the requirements. To prepare the subnet, use the instructions Prepare a private subnet to connect a public IP address.

  1. Create a public IP address.
  2. Create a cloud router with internet connection.
  3. Connect the private subnet to the cloud router.
  4. Connect a public IP address to a device port on the private subnet.
  5. If the subnet gateway does not match the IP address of the cloud router, configure a static route to the Internet on the subnet.

1. Create a public IP address

  1. In the dashboard, on the top menu, click Products and select Cloud Servers.
  2. Go to NetworkPublic IP Addresses tab.
  3. Click Create IP Address.
  4. Select the pool where the public IP address will be created.
  5. Specify the number of public IP addresses - 1.
  6. Click Create.

2. Create a cloud router with internet connection

  1. In the Dashboard, on the top menu, click Products and select Cloud Servers.
  2. Go to NetworkCloud routers tab.
  3. Click Create router.
  4. Select the pool where the cloud router will be created.
  5. Enter the name of the router.
  6. Check the box Connect router to the Internet - an external IP address will be assigned to the router.
  7. Click Create.

3. Connect a subnet to the cloud router

  1. In the Dashboard, on the top menu, click Products and select Cloud Servers.

  2. Go to NetworkCloud routers tab.

  3. Open the router page.

  4. Click Connect Subnet.

  5. Select a private subnet or a global router subnet.

  6. Optional: Enter the IP address of the router - any free IP address from the subnet. If you do not specify an IP address, it will be automatically selected from free subnet addresses.

    To allow devices on the subnet to access the Internet without configuring additional routes, the IP address of the cloud router must match the gateway of the private subnet. If the subnet gateway is already busy, you will need to configure a static route through the cloud router on the subnet to access the Internet.

    You can view the subnet gateway in the Control Panel: in the top menu, click ProductsCloud ServersNetworkPrivate Networks tab → Network page → Subnets tab → Subnet card → Automatic Network Settings block → Subnet Gateway field.

  7. Click Connect.

4. Connect a public IP address to a device port on a private subnet

  1. In the dashboard, on the top menu, click Products and select Cloud Servers.
  2. Go to NetworkPrivate Networks tab.
  3. Open the Network page → Ports tab.
  4. In the port card of the cloud server or load balancer, click Connect Public IP.
  5. Select a public IP address.
  6. Click Connect.

5. Configure a static route to the Internet on a subnet

If you specified a router IP address other than the subnet gateway when connecting the subnet to the cloud router, you must configure a static route to the Internet through the cloud router in the subnet. When configuring, specify:

  • the destination subnet is 0.0.0.0/0;;
  • gateway (next-hop) - IP address of the cloud router.

Configure access to and from the Internet via a public subnet

To configure access to and from the Internet via a public subnet, you must connect the device to the public subnet. For a load balancer and cloud database cluster, this can only be done when creating the load balancer and creating the cluster (example for PostgreSQL). A cloud server can be connected to the public subnet either when the server is created or after it is created - to do this, you need to add the cloud server to the public subnet via a port.

  1. Create a public subnet.
  2. Add the cloud server to the public subnet via port.

1. Create a public subnet

  1. In the Dashboard, on the top menu, click Products and select Cloud Servers.
  2. Go to NetworkPublic Networks tab.
  3. Click Create Subnet.
  4. Select the pool where the public subnet will be created.
  5. Select the subnet size - the range of IP addresses available on the subnet.
  6. Optional: To change the DNS servers, click . Enter one to three values. Click .
  7. Click Create.

2. Add the cloud server to the public subnet via port

  1. In the dashboard, on the top menu, click Products and select Cloud Servers.
  2. Open the server page → Ports tab.
  3. Click Add Port.
  4. Select a public subnet.
  5. Enter the IP address of the port.
  6. Click Add Port.

Set up internet access via cloud router

You can configure Internet access for devices on a private subnet without external access from the Internet.

To do this, you need to connect a cloud router with internet access to the private subnet or the global router subnet where the device is located. If the cloud router is connected to the Internet, it acts as a 1:1 NAT for access from the private network to the Internet via the router's external IP address. The external address is only used to access the Internet from the device, it cannot be used to connect to devices on the subnet.

  1. Create a cloud router with internet connection.
  2. Connect the private subnet to the cloud router.
  3. If the subnet gateway does not match the IP address of the cloud router, configure a static route to the Internet on the subnet.

1. Create a cloud router with internet connection

  1. In the Dashboard, on the top menu, click Products and select Cloud Servers.
  2. Go to NetworkCloud routers tab.
  3. Click Create router.
  4. Select the pool where the cloud router will be created.
  5. Enter the name of the router.
  6. Check the box Connect router to the Internet - an external IP address will be assigned to the router.
  7. Click Create.

2. Connect the subnet to the cloud router

  1. In the Dashboard, on the top menu, click Products and select Cloud Servers.

  2. Go to NetworkCloud routers tab.

  3. Open the router page.

  4. Click Connect Subnet.

  5. Select a private subnet or a global router subnet.

  6. Optional: Enter the IP address of the router - any free IP address from the subnet. If you do not specify an IP address, it will be automatically selected from free subnet addresses.

    To allow devices on the subnet to access the Internet without configuring additional routes, the IP address of the cloud router must match the gateway of the private subnet. If the subnet gateway is already busy, you will need to configure a static route through the cloud router on the subnet to access the Internet.

    You can view the subnet gateway in the Control Panel: in the top menu, click ProductsCloud ServersNetworkPrivate Networks tab → Network page → Subnets tab → Subnet card → Automatic Network Settings block → Subnet Gateway field.

  7. Click Connect.

3. Configure a static route to the Internet in the subnetwork

If you specified a router address other than the subnet gateway when connecting the subnet to the cloud router, you must configure a static route to the Internet through the cloud router in the subnet. When configuring, specify:

  • the destination subnet is 0.0.0.0/0;;
  • gateway (next-hop) - IP address of the cloud router.