Post AkpFEEa8zf7kP70H1k by miah@hachyderm.io
(DIR) More posts by miah@hachyderm.io
(DIR) Post #AkpFEAL6lcihFJwD2G by miah@hachyderm.io
2024-08-10T12:13:39Z
0 likes, 2 repeats
I am reminded that "localhost" is magical. Most believe it resolves to 127.0.0.1, and it usually does. But it's not impossible to add "localhost" to DNS and have it resolve to a different address.Additionally. "localhost" doesn't even have to resolve to 127.0.0.1. We get a whole /8! Do you want to run two local webservers and have them both use port 80? You could have them listen on different addresses! 127.0.0.2 and 127.0.0.3! Have fun 😁
(DIR) Post #AkpFEEa8zf7kP70H1k by miah@hachyderm.io
2024-08-10T12:16:24Z
0 likes, 0 repeats
(Technically we get a /8 for 127.0.0.0, but network stacks can limit it to just 127.0.0.1/32 for loopback according to the RFC)"127.0.0.0/8 - This block is assigned for use as the Internet host loopback address. A datagram sent by a higher-level protocol to an address anywhere within this block loops back inside the host. This is ordinarily implemented using only 127.0.0.1/32 for loopback."https://datatracker.ietf.org/doc/html/rfc5735(I've used the technique on Linux and MacOS)
(DIR) Post #AkpFEIOaoYGEERd6Zs by miah@hachyderm.io
2024-08-10T12:23:30Z
0 likes, 0 repeats
AFAIK there is no limitation to assigning "localhost" to DNS though. If you want to cause chaos and see a bunch of traffic not destined to you, register "localhost" to a regular address in your DNS search path on your network.