# IP addresses, ports and reverse DNS

> How an IP address finds a machine and a port finds a service on it, which addresses Coritan gives you, and what reverse DNS is for.

Source: https://www.coritan.com/docs/learn/ip-addresses-and-ports/

Every machine on the internet has an *IP address*, and every service on a machine listens on a *port*. Together they say where a connection goes: `203.0.113.10:25565` is port 25565 at the address `203.0.113.10`.

## IP addresses

An *IPv4 address* is four numbers from 0 to 255, such as `203.0.113.10`. An *IPv6 address* is longer and written with letters and digits, such as `2001:db8::10`. DNS turns names into these addresses, so people rarely type them ([Domains and DNS](/docs/learn/domains-and-dns/)).

The addresses you order at Coritan are IPv4. DNS records and load balancers also take IPv6 addresses that you host elsewhere ([IPv6](/docs/platform/network/#ipv6)). You meet three kinds of address:

*An instance's primary address*
: The IPv4 address that comes with a Cloud Compute instance. It ends when the instance ends ([Manage an instance's addresses and names](/docs/cloud-compute/networking/)).

*A shared address*
: The address of the machine a Container Apps server runs on. Every server on that machine uses it, each on ports of its own ([Manage server ports](/docs/managed-containers/ports/)).

*A floating IP*
: An address that belongs to your account. You attach it to an instance or a server, and can move it to another one later, so the address outlives the machine behind it. A *subnet* is a block of them ([Floating IPs](/docs/floating-ips/)).

Traffic to a floating IP passes through DDoS Shield, and traffic to a shared address does not ([DDoS attacks and protection](/docs/learn/ddos-attacks/)).

## Ports

A port is a number from 1 to 65535. One address can carry many services at once, each on its own port, and the port tells the machine which service a connection is for. These are ports you may meet:

| Port | Used by |
| --- | --- |
| `22` | SSH, to sign in to an instance |
| `80` and `443` | Websites, over HTTP and HTTPS |
| `25` | Mail servers passing mail to each other |
| `587` and `465` | Mail apps and applications sending mail |
| `993` | Mail apps reading a mailbox over IMAP |
| `25565` | Minecraft: Java Edition servers |

When a service uses its usual port, people can leave the port out: a browser uses 443 for an `https://` address, and Minecraft uses 25565. Many servers share one shared address, so each one gets port numbers of its own, and players type the port after the address. With a floating IP attached, a server can also answer on the game's usual port, so players join with the address alone ([Manage server ports](/docs/managed-containers/ports/)).

## Reverse DNS

DNS turns a name into an address. *Reverse DNS* goes the other way: a lookup of an address returns a hostname, from a `PTR` record that the holder of the address sets. Mail servers check it before they accept mail, so a mail server needs reverse DNS that names a hostname, and an `A` record for that hostname that points back at the address.

At Coritan, you set the reverse DNS of a floating IP on its **Reverse DNS** tab. You can change it as often as you like, but you cannot remove it once it is set ([Set reverse DNS for a floating IP](/docs/floating-ips/reverse-dns/)).

## Next steps

- [Order a floating IP](/docs/floating-ips/order-a-floating-ip/)
- [Attach and detach a floating IP](/docs/floating-ips/attach-and-detach/)
- [Set reverse DNS for a floating IP](/docs/floating-ips/reverse-dns/)
- [Manage server ports](/docs/managed-containers/ports/)
