{"canonical_url":"https://engineer.company/glossary/host/","content_markdown":"# Host\n\n## What it is\n\nA host is a computer at the end of a network path: the machine traffic is\naddressed to and comes from, as opposed to the routers and switches that only\npass it along. Engineers also say _host machine_, call the name it answers to\nits _hostname_, and in virtualisation speak of the physical host that carries\nguest machines. To _host_ something, as in web hosting, is to run it on such a\nmachine.\n\nThe internet's own definition dates from October 1989. RFC 1122, the\nrequirements document for internet hosts, calls a host computer, or simply host,\nthe ultimate consumer of communication services, a machine that generally runs\napplication programs on behalf of its users. It corresponds to what the OSI\nmodel called an end system. The networks between hosts are joined by gateways,\nwhich today are called routers. The same document covers everything from\nsingle-purpose hosts to full-service ones, and calls a host with more than one\nnetwork interface multihomed.\n\nThat line between host and router is drawn by behaviour, not by hardware. RFC\n1122 says that any host “that forwards datagrams generated by another host is\nacting as a gateway”, requires a switch that turns the gateway function off, and\nrequires that switch to default to off. A host with two network interfaces still\ndoes not start forwarding on its own. A laptop, a phone, a printer, a rented\nvirtual machine and a container with an address of its own are all hosts.\n\nNIST's glossary keeps two definitions side by side. One counts any hardware\ndevice with a way onto a network. The other, from guidance on securing web\nservers, says that a server is a host to its clients and that a client station\nis a host too, because it is “a source of information to the network”, unlike a\nrouter or switch, which directs traffic. That is the useful contrast with the\nword server. A server is a role a program plays, answering requests. A host is\nthe machine, whether it answers anyone or not. One host can run many servers,\nand a laptop that runs none is still a host.\n\nA host collects names. The companion document, RFC 1123, set the rules for host\nnames: the first character may be a digit as well as a letter, host software\nmust handle names up to 63 characters and should handle names up to 255, and\nwherever a user can type a host's name, typing its address in dotted-decimal\nform should work as well. On top of that, the DNS can point any number of names\nat one address, and HTTP lets a client say which of them it wants in the `Host`\nfield of each request, so a single host can answer for many sites.\n\n## Why it matters\n\nThe host is the unit that operations count by. Inventories list hosts,\nmonitoring watches hosts, firewall rules and access lists name them, and cloud\nproviders bill them by the hour or month. A plan that says “add a host” is\nconcrete in a way that “add capacity” is not: it means one more machine to\ncreate, name, patch, back up and pay for.\n\nIt is also the unit of compromise. Whoever controls a host controls every server\nprogram on it, every key stored on its disk and every connection it can make.\nWhat a host holds sets the cost of losing it, which is why careful operators\ndecide per host which secrets, which data and which network paths it gets, and\ngive it no more.\n\nAnd it is where names meet. The same machine is known by the name in the\ninventory, the name it calls itself, the DNS names pointing at its address and\nthe names in the requests it receives. When those agree, a log line, an alert\nand a support ticket lead to the same box. When they drift, a person paged at\nnight spends the first minutes of the incident finding the machine.\n\n## What it looks like in practice\n\nThis site's operations work treats the host as the thing to build from code and\ngive its own secrets. When the platform needed a second machine at a different\nprovider,\n[the second host is created, or re-adopted, from the repository](/portfolio/provisioned-a-second-server-from-code/).\nThe first machine had been made by hand and given its firewall afterwards, which\nleaves a window where a fresh host with a default password policy is reachable\nfrom the internet. The role that creates the second one adopts an existing\nmachine rather than duplicating it, so running it again is safe, and its own\nfile states the instance type, the region, the specification and the monthly\ncost in euros, because it is the one role in the repository that spends money.\n\nGoing from one host to two then exposed every value written on the assumption\nthat there would only ever be one.\n[Each operational secret became a map keyed by host](/portfolio/split-every-operational-secret-per-host/).\nThe page records why sharing was wrong in two ways. A dead-man's switch shared\nby two hosts alerts less than two switches, not more: either host still checking\nin keeps it green while the other is dead. And sharing a backup passphrase couples the hosts' exposure. Separate restic repositories can\nhave different master keys even when they use the same passphrase, but someone who obtains that\npassphrase and can read both repositories' encrypted data and key files can unlock both. The existing host was\nnamed in all four maps with its repository and both switches left empty, which\nthe page calls the truthful state.\n\nFrom a visitor's side the word means something smaller: a name the browser\ncontacts. The security page invites a reader to\n[open the browser's network panel and count the hosts](/security/), and says\nthere is one, and it is the site's own.\n\n## Where it goes wrong\n\n**A host starts forwarding traffic it was meant only to receive.** Container\nnetworking and VPN software switch IP forwarding on, and from then on the host\nroutes between its interfaces. Docker's documentation, for one, says it enables\nboth settings below when it starts and then drops forwarded packets unless a\nrule accepts them. Where forwarding is on without such a rule, firewall rules\nwritten for traffic addressed to the host leave traffic passing through it\nalone, and a network behind it becomes reachable by a path nobody drew. Read the\nswitches, and write forwarding rules on purpose wherever they say `1`:\n\n```sh\nsysctl net.ipv4.ip_forward net.ipv6.conf.all.forwarding\n```\n\n**The names disagree.** The inventory says one thing, the machine calls itself\nwhatever the provider's image chose, DNS has a third name and the TLS\ncertificate a fourth. Every alert then carries the name nobody uses. Take the\nmachine's own hostname from the same source as the inventory and the DNS\nrecords, and set it when the host is created rather than when someone notices.\n\n**A server answers whatever host name it is sent.** The `Host` field comes from\nthe client, and a server that answers unknown names with a default site will\nbuild links, redirects and cached pages from a name an attacker chose. RFC 9110\nwarns that the field is a frequent target for malware trying to “poison a shared\ncache or redirect a request to an unintended server”. Answer only the names the\nhost actually serves, refuse the rest, and build absolute links from\nconfiguration rather than from the request.\n\n**Cloned hosts share an identity.** A machine copied from an image carries\nwhatever the image held: SSH host keys, tokens, sometimes a backup passphrase.\nClients can then no longer tell the copies apart, and one leak opens every copy.\nGenerate host keys on first boot, keep secrets out of images, and give each host\nits own entry wherever a secret is configured.\n\n## Further reading\n\n- [host — NIST CSRC Glossary](https://csrc.nist.gov/glossary/term/host) — both\n  definitions, including the one that sets hosts against routers and switches.\n- [RFC 1122: Requirements for Internet Hosts, Communication Layers](https://www.rfc-editor.org/rfc/rfc1122.html)\n  — the 1989 definition of a host, multihoming, and forwarding switched off by\n  default.\n- [RFC 1123: Requirements for Internet Hosts, Application and Support](https://www.rfc-editor.org/rfc/rfc1123.html)\n  — the rules for host names and their lengths, in section 2.1.\n- [RFC 9110, HTTP Semantics: Host and :authority](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.2)\n  — how one server tells many host names apart, and why the field is a target.\n\n\u003chttps://engineer.company/glossary/host/\u003e\n","date_modified":"2026-11-09T21:50:25Z","description":"What a host is on a network, how it differs from a router and from a server, where its several names come from, and why each host keeps its own secrets.","formats":{"gemtext":"https://engineer.company/glossary/host/index.gmi","gopher":"https://engineer.company/glossary/host/gophermap","html":"https://engineer.company/glossary/host/","json":"https://engineer.company/glossary/host/index.json","markdown":"https://engineer.company/glossary/host/index.md","pdf":"https://engineer.company/glossary/host/index.pdf"},"kind":"page","language":"en","title":"What is a host?","url":"https://engineer.company/glossary/host/","version":1}