How are dynamic addresses assigned?
Through DHCP, the Dynamic Host Configuration Protocol. When a device joins a network it broadcasts a request; a DHCP server offers an address from its pool, along with the gateway, DNS servers and a lease time. The device accepts, uses the address and renews the lease before it runs out. If the device disconnects long enough, or the provider reorganizes its pools, the next lease may bring a different address. The four messages of the exchange are often remembered as DORA: discover, offer, request, acknowledge.
Where do dynamic addresses show up?
| Network | Typical behavior |
|---|---|
| Home broadband | Public IPv4 may change after a router restart or every few days or weeks |
| Mobile data | Often shared behind carrier-grade NAT, changes frequently |
| Office LAN | Private addresses from the office router, public address often fixed |
| Cloud VMs | Private address by DHCP, public address may change on stop and start unless reserved |
| Dedicated servers | Fixed public address |
Your server is on the last line: its address does not change, as described on Static IP address. The challenge is usually the other end, the admins and users connecting to it from dynamic addresses.
Why do providers use dynamic addresses?
IPv4 addresses are scarce. Handing them out only to connected customers lets a provider serve more customers from the same pool, and automated assignment removes manual configuration. For a home user who only makes outbound connections, a changing address is invisible.
How do I allow SSH from an admin with a dynamic address?
A firewall rule pinned to one home address breaks the day it changes. Options, from simplest to most robust:
- Key-only SSH open to all, with fail2ban for noise. With strong keys, open SSH is safe; see Harden SSH on Linux.
- Allow the provider's range rather than one address. Wider, but stable for months.
- A VPN on the server: admins connect with WireGuard from anywhere, and SSH listens only on the VPN interface. VPN server shows the setup.
- Dynamic DNS plus a refresh script: a home router updates a DNS name, and a cron job on the server resolves it and updates the firewall rule.
A minimal version of the last idea, run from cron every five minutes:
ip_now=$(dig +short home-admin.example.net A | tail -1)
nft flush set inet hostfw admins
[ -n "$ip_now" ] && nft add element inet hostfw admins "{ $ip_now }"
It assumes a set named admins in your nftables table that the SSH rule references.
Can I host a service on a dynamic address?
For a hobby project at home, yes, with dynamic DNS that updates a host name whenever the address changes. But many home connections block or discourage inbound ports, sit behind carrier NAT with no public address of their own, and change address at unpredictable times, which breaks open connections. Anything others depend on belongs on a fixed address, which is the main reason people move a service from a home box to a rented machine such as E1 or S1.
Does DHCP run on dedicated servers at all?
Often inside them. A Proxmox host or Docker bridge runs DHCP for its guests on a private network, handing them dynamic addresses while the host keeps its fixed public one and acts as their gateway. dnsmasq is a common choice for that job. iptables port forwarding covers publishing guest services through the host. For looking up who owns an address or what it resolves to, see The dig command.
Dynamic or static: how do I tell?
On Linux, ip -d addr shows dynamic next to addresses obtained by DHCP, with a valid_lft countdown, while static ones show valid_lft forever. On a home connection, checking your public address over a few days with curl -s https://ifconfig.co answers the question in practice.
Fixed-Address Machines for Moving Off Home Hosting
| Server | Processor | Cores / threads | Memory | Storage | Network | Per month | Smallest order |
|---|---|---|---|---|---|---|---|
| E1 | Intel Xeon E3-1240 v3 | 4 / 8 | 16 GB DDR3 | 2x 240 GB SSD | 2x 1 Gbps | $30.52 | $91.56 (3 months) |
| E2 | Intel Xeon E3-1270 v3 | 4 / 8 | 32 GB DDR3 | 1x 480 GB SSD | 2x 1 Gbps | $38.32 | $114.96 (3 months) |
| S1 | Intel Xeon E-2276G | 6 / 12 | 64 GB DDR4 | 1x 1 TB NVMe | 2x 10 Gbps | $53.32 | $53.32 (1 month) |
| S5 | Intel Xeon E-2276G | 6 / 12 | 128 GB DDR4 | 2x 1 TB NVMe | 2x 10 Gbps | $88.72 | $88.72 (1 month) |
Keep Reading
Static IP address
An IP address that stays the same, why servers need one, how a /31 point-to-point setup works and how to check the network config on Linux.
OpenVPN server
A server that accepts encrypted tunnels from devices or sites and joins them to a network, with WireGuard and OpenVPN compared.
OpenHarden SSH on Linux
A practical hardening list for sshd on a fresh dedicated box: keys, users, rate limits, firewall scope and an outside audit.
OpenIP address
What an IP address is, how IPv4 and IPv6 differ, public versus private ranges, CIDR notation and how traffic finds your server.
OpenFAQ
Quick Answers
A static address stays fixed. A dynamic address is leased by DHCP for a limited time and may change.
Home providers lease addresses dynamically, so a router restart or lease expiry can bring a new one.
Use key-only SSH open to all, allow your provider range, connect through a VPN, or update a firewall set from a dynamic DNS name.
The public address is fixed. DHCP is common inside the server for VMs and containers on private networks.
Run ip -d addr. Dynamic addresses show the dynamic flag and a finite valid lifetime.