IPv4 and IPv6 on a server
A typical VPS has one public IPv4 address and, if the host supports it, an IPv6 subnet. An extra IPv4 address almost always costs money, and the cheapest plans sometimes come without their own IPv4 at all. Here is where the shortage comes from, what you can do with IPv6 alone and which address settings a mail server needs.
An IP address is a server's number on the internet. In IPv4 it is 32 bits long, giving about 4.3 billion addresses in total, and some of them are reserved for special-purpose and private networks. In IPv6 the address is 128 bits long, and there are so many addresses that a host can give every server an entire subnet. The two protocols run in parallel: a dual-stack server is reachable both by those who have IPv6 and by those who have only IPv4.
Why IPv4 ran out and costs money
Free IPv4 addresses were handed out by five regional registries, each in its own part of the world. Their common pool at IANA ran out on 3 February 2011: on that day the last addresses were split equally between the registries. North America's ARIN exhausted its pool on 24 September 2015. Europe's RIPE NCC handed out its last free addresses on 25 November 2019. Since then a new organisation can join the RIPE NCC waiting list and receive just 256 addresses (a /24) when addresses returned by others come back into the pool.
So a host that needs new addresses buys or leases them from other organisations and either passes the cost into the plan price or charges for an extra address separately. According to the accsly catalog as of 2 November 2026, across 140 hosts that state the price of an extra IPv4 unambiguously, the median is about $2.2 a month per address (180 ₽ at the 2 November 2026 rate), and half of the prices range from about $1.9 to $3.4. A free extra address is a rarity.
Hence a practical tip: if the server needs several addresses — separate sites with their own certificates have not required this for a long time, but it can be needed for mail or for separating services — factor them into the plan price from the start.
NAT VPS and servers without IPv4
To sell servers more cheaply, some hosts do not give each one its own IPv4. There are two variants.
- NAT VPS: one external IPv4 for several servers, each with its own small range of ports. The host forwards an incoming connection on a port from your range to your server. That is enough for SSH, a bot that calls APIs itself, or tests. You cannot run a website on ports 80 and 443 without an intermediary, and the PTR and the address reputation are shared with the neighbours.
- IPv6-only: the server has IPv6 addresses only. Incoming connections are possible only from those who have IPv6; outgoing ones only to resources reachable over IPv6.
In the accsly catalog, 349 VPS plans from 31 hosts come without their own IPv4. Buy such a plan only if you understand what the server will do and where connections to it will come from.
IPv6 and the /64 subnet
In IPv6 the address is split in half: the first 64 bits are the network number, the last 64 bits the number of the device within it. This is a requirement of the IPv6 architecture (RFC 4291, discussed in RFC 7421), so the minimum subnet for a single network segment is a /64, and it is not customary to divide it further. In its recommendations for operators (document RIPE-690), RIPE NCC advises giving a customer a /48 or /56, and no less than a /64 per segment.
For a server this means: a /64 holds more than 18 quintillion addresses, and you can put as many IPv6 addresses on one VPS as you need, free of charge. In practice hosts assign them differently — a whole /64, a larger subnet or individual addresses from a shared network — so check the terms if you need many addresses. IPv6 support is confirmed by 703 hosts in the catalog; plans are in the collection VPS with IPv6.
Three commands check that IPv6 works on the server:
ip -6 addr show scope global
ping -6 -c 3 2001:4860:4860::8888
curl -6 -sI https://www.google.com | head -1
The first shows the assigned addresses, the second that the server reaches the outside network over IPv6, the third that DNS and HTTPS work. Do not forget the firewall: IPv4 rules do not automatically apply to IPv6. ufw applies them to both protocols, while with hand-written iptables rules you need a separate ip6tables set. The other hardening steps are in First 10 steps after buying a VPS: security.
When IPv6 alone is enough
An IPv6-only server fits when ordinary visitors do not connect to it directly:
- internal services — a database, a queue, backup storage — that your own IPv6-enabled servers connect to;
- a website behind a CDN or reverse proxy: visitors arrive at the CDN's IPv4 address, and the CDN fetches pages from your server over IPv6 — if the CDN provider supports it;
- test environments and code builds, if all the repositories you need are reachable over IPv6;
- SSH administration, if you yourself have IPv6 at home or in the office.
It is not enough if visitors connect to the server directly — a website without a CDN, a game server, mail — or if the server itself calls services that have no IPv6: some APIs, package mirrors and websites still work over IPv4 only. For outgoing connections to them there is the NAT64 and DNS64 mechanism (RFC 6146 and RFC 6147): the host or a public service translates requests to IPv4 addresses into IPv6. If the host does not provide it, an IPv6-only server cannot reach such resources.
Reverse DNS (PTR) for mail
An ordinary DNS record maps a name to an address (A for IPv4, AAAA for IPv6). A reverse PTR record maps an address to a name. It matters to mail servers: Google requires senders to have a PTR record for the sending address pointing to a name, and that name in turn must point back to the same address. Without this, mail to Gmail is rejected or lands in spam. The recommendation to keep a matching PTR and A for every address already appears in RFC 1912.
PTR is set by the owner of the address — the host. Usually it is a field in the server control panel or a request to support. The steps:
- create an A record (and AAAA if mail will go out over IPv6), for example
mail.example.com→ the server address; - ask the host, or enter in the panel, a PTR for the same address: address →
mail.example.com; - check with
dig -x server_address +short— the answer must match the name from the A record; - if the server also sends mail over IPv6, the IPv6 address needs a PTR too, otherwise some messages will go out from an address without a reverse record.
On a NAT VPS you cannot set your own PTR: the address is shared. Another requirement for a mail server is an open outbound port 25: some hosts close it by default and open it on request. Plans where this is possible are in the collection VPS for a mail server. For other plan terms worth checking before you pay, see How to read hosting plans: the hidden limits.