News for hackers. Stuff that matters.
Re:Reasons for servers to support IPv6 by zokier on Saturday January 29, 2022 @10:57AM (#30127294)
What I haven't quite fathomed with IPv6 is that as a home user without my own AS, am I supposed to use my ISP provided addresses in my internal network? ISP provided addresses that I have no control over and could change at any time? With IPv4, I just use RFC1918 addresses as I like and I have full control over the addresses and their allocation and I can then very easily set up iptables rules, dhcp pools, dns records etc. Then I just NAT at the edge of my network, and the configuration is practically completely isolated from my ISP and whatever addressing they do.
Re:Reasons for servers to support IPv6 by franga2000 on Saturday January 29, 2022 @01:45PM (#30129104)
IPv6 has private addresses too. In my network, all computers have 3 addresses: public, private and link-local. All local services use the private ones and those never change. (I don't think they're called "private" in the spec, but the idea is the same)
Re:Reasons for servers to support IPv6 by benttoothpaste on Saturday January 29, 2022 @11:52AM (#30127862)
In addition IPv6 has this weird restrictions on which prefixes are valid. For example if your ISP gives you /64 prefix, most consumer routers will not recognize it as valid. And even if you have a very configurable router it will take lots of work to configure that - even though in theory you should have tons of addresses available. And if you get a /128 prefix, good luck that - NATs are apparently disallowed in IPV6 world.
Re:Reasons for servers to support IPv6 by mjevans on Saturday January 29, 2022 @02:26PM (#30129525)
RIPE approved prefix lengths for end customers are /48, /52, /56, /60, and /64; though the prefixes longer than /56 are strongly discouraged and probably reflect either an ISP that doesn't get IPv6 or that is anti-consumer if they do.

https://www.ripe.net/publications/docs/ripe-690#4-2--prefix-...

... "Each hexadecimal character in an IPv6 prefix represents one nibble, which is 4 bits. The length of a delegated prefix should therefore always be a multiple of 4.

A single network at a customer site will be a /64. At present, RIR policies permit assignment of a /48 per site, so the possible options when choosing a prefix size to delegate are /48, /52, /56, /60 and /64.

...

The following sections explain why /48 and /56 are the recommended prefix assignment sizes for end customers.

...

It is strongly discouraged to assign prefixes longer than /56 unless there are very strong and unsolvable technical reasons for doing this."

Re:Reasons for servers to support IPv6 by tsimionescu on Saturday January 29, 2022 @04:42PM (#30130839)
Is RIPE a law? Can they force my ISP to give me a /56 if they're giving me a /128?
Re:Reasons for servers to support IPv6 by zamadatix on Saturday January 29, 2022 @06:38PM (#30131784)
It's not law but going to hurt your ISP to not give at minimum a /64 way more than it's going to hurt anyone else as everything is made to make doing so easy from standards all the way down to hardware. Besides RIPE is going to hand them a /32 which is ~4 billion /64s without question and will keep doing that 'til the cows come home so it's not like trying to keep all of the customers in a single /64 saves them from running out of anything. Shoot I even got a /32 for a single non-ISP company without much hassle.

Also RIPE reserves the ability to retract the ISP's IPv6 space, though I really doubt it'd come to that. A lot of the original large swaths of IPv4 were considered owned not leased, that is no longer.

Re:Reasons for servers to support IPv6 by zamadatix on Saturday January 29, 2022 @01:59PM (#30129262)
> For example if your ISP gives you /64 prefix, most consumer routers will not recognize it as valid.

A /64 is the most valid IPv4 prefix there is. Most consumers should be given multiple (usually about 16) and the router starts with the first one.

> And if you get a /128 prefix, good luck that

No kidding, that's a single address subnet!

> NATs are apparently disallowed in IPV6 world.

It's allowed it's just not the right answer in the vast majority of cases.

Re:Reasons for servers to support IPv6 by zekica on Saturday January 29, 2022 @12:13PM (#30128063)
NAT is not disallowed in IPv6, it's just discouraged as it breaks end-to-end principle. You can still have stateful firewalls that work for the majority of cases and you can also use NPT (network prefix translation also called 1-to-1 NAT) if you want. There is even a RFC specifying on how to do NPT without creating compute overhead for routers by making the packets have the same CRC.
Re:Reasons for servers to support IPv6 by Spivak on Saturday January 29, 2022 @02:00PM (#30129269)
NAT is actually probably preferred too for homelabbers one because you don’t have to re-address things ever and also because you can use your whole ISP assignment as a pool of dynamically assignable/attachable public addresses.
Re:Reasons for servers to support IPv6 by DarylZero on Saturday January 29, 2022 @04:54PM (#30130934)
Are you thinking of prefix translation?
Re:Reasons for servers to support IPv6 by Spivak on Saturday January 29, 2022 @07:01PM (#30131990)
Not that I know of. I’m using ip6tables with an, honestly garbage, script to give me similar functionality to AWS Elastic IPs.

- Everything inside the network gets a private address from DHCPv6.

- I have a pool of some of my assigned prefix designated as generic outbound which use masquerading and multipath routing so my home traffic isn’t all coming from a single address. This is mostly useless but was fun to set up.

- Then for the rest of the prefix I can create “attachments” where traffic from one of the public ips in the pool is routed to the private address using DNAT and then all outbound traffic from that host is SNATted to come from that public ip.

So the internal hosts can have zero knowledge that they even have a public address, their privates will just start receiving traffic from the internet. When I get a new assignment from my ISP nothing internal will have to change.

It’s port forwarding on steroids!

Re:Reasons for servers to support IPv6 by DarylZero on Sunday January 30, 2022 @09:36AM (#30137527)
I see. Well it sounds like you "should" be using prefix translation instead of DNAT/SNAT (i.e., use the iptables DNPT/SNPT targets instead). Probably doesn't matter enough to change though.
Re:Reasons for servers to support IPv6 by chungy on Saturday January 29, 2022 @06:04PM (#30131517)
IPv6 has fc00::/7 (everything from fc00:: to fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff) as the equivalent to RFC1918 addresses (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16). You can set some private v6 subnet in DHCPv6 and be happy (or do static assignments or whatever suits you).

Also, honestly, using IPv4 on LANs still makes sense no matter what trend the internet goes for.

Re:Reasons for servers to support IPv6 by BitPirate on Saturday January 29, 2022 @11:14AM (#30127466)
If you don't have a static subnet, you can still use ULAs.
Re:Reasons for servers to support IPv6 by BenjiWiebe on Saturday January 29, 2022 @11:29AM (#30127629)
Exactly. With IPv6 you are expected to have multiple addresses. Some to access the internet with that may change, some that don't change and aren't globally routable to access your own stuff with. Though you can also (if your router supports it) assign hostnames to your devices so you can access them via their non-static global addresses.
Re:Reasons for servers to support IPv6 by nicolas314 on Sunday January 30, 2022 @10:14AM (#30137853)
If I understood correctly, the link between ULA-based address and host name is done through a DUID. This is assuming that DUID values do not change over time and can easily be harvested from everything you want to connect to the local network. What guarantees that DUIDs are fixed and easily collectable? What are the solutions if they aren't?
Re:Reasons for servers to support IPv6 by infiniteloop0 on Saturday January 29, 2022 @12:07PM (#30128010)
You can do this with IPV6, these days it's called ULAs (unique unicast local addresses)[0]. Previously there was a formal prefix allocation to solve for this (site local addresses), however they have been deprecated for a bit now. [0]: https://blog.apnic.net/2020/05/20/getting-ipv6-private-addre...