Shared IPv4, Dedicated IPv4 and IPv6

Public IPv4 addresses are scarce. Every server gets a public IPv6 address and a block of ports on its region's shared IPv4 address, included in the price. If you need an IPv4 address of your own, add a dedicated one.

Choosing when you create a server

Shared IPv4 + IPv6 (included)Dedicated IPv4 (paid add-on)
IPv6Yes, publicYes, public
IPv4A block of ports (10 by default) on an address shared with other serversAn address of your own, every port
SSH over IPv4ssh -p <first port> root@<shared address>ssh root@<your address>
Ports 80/443 on IPv4No: use a port in your block, IPv6, a load balancer or site hostingYes

In the console the choice is Network access on the create page. In the API it is network_access: "shared" (the default) or "dedicated". A dedicated address is taken from the region's pool before the server is created: if none is free, or you already hold as many dedicated addresses as your plan allows, the request is refused and no server is created.

POST /api/v2/servers
{ "name": "web-1", "size": "vps-2", "network_access": "dedicated" }

Shared IPv4 ports

Your server's block is shown on its page under How to connect, for example 203.0.113.10, ports 20000-20009. The first port is forwarded to SSH (port 22) on the server:

ssh -p 20000 [email protected]

Forward any other port of your block to any port on the server, over TCP or UDP. A web app listening on port 8080 becomes reachable as http://203.0.113.10:20001 after:

POST /api/v1/instances/web-1/ports
{ "protocol": "tcp", "public_port": 20001, "target_port": 8080, "description": "app" }

GET    /api/v1/instances/web-1/ports
DELETE /api/v1/instances/web-1/ports?protocol=tcp&public_port=20001

Listing needs an API key with instances:read, changing needs instances:write. Rules:

  • Public ports must be inside your block; the server port can be anything from 1 to 65535.
  • Forwarding to port 25 (SMTP) is refused unless support has enabled mail for your organization.
  • The ports start working once the server is running and has its address, usually within a minute of the first start.
  • If the server is moved to another host in the region (a migration or host maintenance), its block moves with it to that host's shared address: the address and port numbers can change. The new ones are on the server page.
  • Deleting the server frees its block.

IPv6

Servers get their IPv6 address automatically. It is shown on the server page and in the API (ipv6_addresses), and reaches the server directly on every port:

ssh root@2001:db8:10::5

Because nothing sits in front of it, protect what should not be public with a firewall. If the page says the server has no public IPv6, the region's network does not provide one yet; contact support.

Dedicated IPv4

A dedicated address is routed to your server, which then has to answer on it: add it to the server's network interface (and to its network configuration, so it survives a reboot):

ip addr add 198.51.100.5/32 dev eth0

You can also take an address later, move it between servers and release it from the IP addresses page (see Floating IPs). Reverse DNS requests go to support. How many addresses you may hold depends on your plan.

Pricing

Shared IPv4 ports and IPv6 are included with every server. A dedicated IPv4 address is $2 a month by default, billed hourly (the monthly price divided by 730, stopping at the monthly price each month) from the hour it is assigned to your account until you release it, whether or not it is attached to a server. The console shows the current price on the create page and the IP addresses page. See Billing.

Related