Hacker News new | ask | show | jobs
by globular-toast 1760 days ago
Use link local IPv6 addresses internally (or unique local if you need to). That's what they are for. You can also make them very short, like fe80::1, fe80::2, etc. Your router won't forward anything in fe80::/10 to the Internet (or any other network).
1 comments

That could work really great for connecting among hosts in my network (but IPv4 and an appropriate 172.x.x.x subnet works just fine, with the bonus one IP has Internet access while remaining unchanging), and is something I may try if I ever get back to re-configuring my home network (so take an upvote from me), but it still doesn’t solve the pesky “one IP for localhost issue”.

Sure, I could give localhost a lot more addresses in IPv6 with the appropriate `ipconfig` or `ip` command, but that doesn’t work with the testing Docker container whose Dockerfile I share with my users (since their Docker container will have only one IPv6 address; also, you can’t run `ipconfig`/`ip` type stuff in a Docker container).