Cloud routers
With a cloud router, you can:
- route traffic between private subnets. All private subnets connected to the same router can communicate with each other and use the router's IP address as the default route;
- configure internet access for devices in a private subnet (outgoing traffic) and from the internet (incoming traffic), for more details, see the [Configure Internet Access] Configure access to the internet and from the internet guide. The cloud router performs 1:1 NAT via an external IP address, which is allocated when the router is connected to the internet: it organizes internet access from the private subnet and handles incoming traffic packets for public IP addresses.
On a cloud router, you can configure static routes.
A cloud router can only be used within one project and one pool.
Cloud routers have traffic volume limits, i.e., bandwidth. You can view it in the Bandwidth table.
You can work with cloud routers in the Control panel, using OpenStack CLI or Terraform.
Create a cloud router
When creating a router in the multi-availability zone pool ru-6, you can select an availability zone where the router will be created. You can only select an availability zone when creating a router via OpenStack CLI.
Control panel
OpenStack CLI
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Go to the Network → Cloud Routers tab.
- Click Create router.
- Select a location where the cloud router will be created.
- Enter the router name.
- Optional: check the Connect router to internet box — an external IP address will be allocated for the router.
- Click Create.
Connect a subnet to a cloud router
To allow private subnets from different networks to communicate with each other, they must handle they be connected to the same cloud router. Subnets must not overlap — they must not contain identical IP addresses.
To configure internet access for devices in private subnets, see the Configure access to the internet and from the internet guide.
Control panel
OpenStack CLI
-
In the Control panel, on the top menu, click Products and select Cloud Servers.
-
Go to the Network section → Cloud Routers tab.
-
Open the router page.
-
Click Connect subnet.
-
Select a private subnet or a global router subnet.
-
Optional: enter the router IP address—any available IP address from the subnet. If you do not specify an IP address, one will be automatically selected from the available addresses in the subnet.
For devices in the subnet to access the internet without additional routes, the cloud router IP address must match the private subnet gateway. If the subnet gateway is already in use, you will need to configure a static route to the internet in the subnet via the cloud router.
You can view the subnet gateway in the control panel: in the top menu, click Products → Cloud Servers → Network → tab Private networks → network page → tab Subnets → subnet card → block Automatic network settings → field Subnet gateway.
-
Click Connect.
Disconnect a subnet from a cloud router
You cannot detach a subnet from a cloud router if:
- the router is processing traffic for public IP addresses of devices in this subnet;
- there are static routes on the router that specify IP addresses of this subnet as the next-hop.
Control panel
OpenStack CLI
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Go to the Network → tab Cloud Routers.
- Open the router page → Ports tab.
- In the port line for the required subnet, click .
- Click Delete.
Connect a cloud router to the internet
To configure internet access for devices in a private subnet, the subnet must be connected to a cloud router with internet access. To get internet access, the router connects to an external network (external-network), and an external IP address is allocated, which the router will use to perform 1:1 NAT.
You cannot access devices behind the router from the internet using the router's external IP address. It is only used for devices to access the internet through the router.
To configure access to devices from the internet, use a public IP address or a public subnet; for more details, see the Configure access to the internet and from the internet guide.
Control panel
OpenStack CLI
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Go to the Network → Cloud Routers tab.
- In the menu of the cloud router, select Connect to internet.
Disconnect a cloud router from the internet
If you disconnect a cloud router from the internet, its external IP address is returned to the IP pool. After reconnecting, the IP address will change.
A cloud router cannot be disconnected from the internet if it is processing traffic for public IP addresses.
Control panel
OpenStack CLI
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Go to the Network → Cloud Routers tab.
- In the menu of the cloud router, select Disconnect from internet.
- Click Disable.
Assign a firewall to a cloud router port
Incoming and outgoing traffic that is not permitted by cloud firewall rules will be denied at the cloud router port. Active sessions on the router that cannot be established under the new rules will be terminated.
You cannot assign more than one firewall to a single router port.
Control panel
OpenStack CLI
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Go to the Network → Cloud Routers tab.
- Open the cloud router page.
- In the row of the private subnet port for which you want to configure traffic filtering, in the Firewall field, click .
- Select a firewall.
- Click Save.
Disable firewall on a cloud router port
Cloud firewall rules will stop applying — all incoming and outgoing traffic passing through the cloud router port will be permitted.
Control panel
OpenStack CLI
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Go to the Network → Cloud Routers tab.
- Open the router page.
- In the row of the private subnet port for which traffic filtering was configured, in the Firewall field, click .
- Select No firewall.
- Click Save.
Enable a cloud router
Control panel
OpenStack CLI
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Go to the Network → Cloud Routers tab.
- In the cloud router card, enable the router.
Disable a cloud router
A router cannot be disabled if it is processing traffic for a public IP address.
Control panel
OpenStack CLI
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Go to the Network → Cloud Routers tab.
- In the cloud router card, disable the router.
Delete a cloud router
Control panel
OpenStack CLI
-
In the Control panel, on the top menu, click Products and select Cloud Servers.
-
Go to the Network → Cloud Routers tab.
-
Disconnect all connected subnets from the router; to do this, delete the ports of all subnets from the router:
3.1. Open the router page → tab Ports.
3.2. In the row of any port, click .
3.3. Click Delete.
3.4. Repeat steps 3.2–3.3 for all remaining ports.
-
In the menu of the router, select Delete router.
-
Click Delete.