This should be easy, right ?

  • SteveTech@programming.dev
    link
    fedilink
    English
    arrow-up
    7
    ·
    6 days ago

    If you’re already getting an IPv6 prefix allocated, then you can randomise the second half of the address, most devices do this automatically with EUI-64.

    Otherwise you pretty much just have to use some sort of IPv6 tunnel.

  • BigDanishGuy@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    4
    ·
    5 days ago

    What are you trying to achieve?

    You need to be on the same network as the next hop (ie router), otherwise you can’t communicate with it. That means that either your ISP or your VPN provider, will have to have the same prefix.

    In a matter of “asking” for an IPv6 address, ie using DHCPv6, I don’t think most ISPs do this. Hopefully your ISP just hands you a GUA prefix through SLAAC, meaning you’ll do a Router Discovery broadcast when enabling IPv6 on your host interface, you’ll get a Router Advertisement back, and from that you get the prefix. With the prefix in hand you generate the last 64bits either randomly or through EUI64 (if privacy isn’t your thing).

    When I say hopefully, it’s because at least one of my possible ISPs insists on DHCPv6 with a ridiculously short lease time. Or at least that’s what the customer rep said before I ran away.

  • dan@upvote.au
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    5 days ago

    That kinda how it already works, assuming your ISP knows what they’re doing and gives you at least a /64 range. IPv6 addresses are 128 bits long. The first 64 bits are the network address and are set by your ISP (or by both you and your ISP if they give you range larger than /64), and the last 64 bits can be whatever you want. Usually it’s randomly generated and changes periodically, as long as IPv6 Privacy Extensions are enabled (enabled by default on client OSes, but usually disabled by default on server-oriented OSes).

    Note that IPv6 is different to IPv4 in that it does not use NAT. Each device on your network gets its own public IPv6 address. That doesn’t mean they’re exposed to the internet though; your router will still have a firewall to block incoming connections.

  • seaQueue@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    6 days ago

    Use a free Hurricane Electric ipv6 tunnel. They’ve been the go-to “my ISP doesn’t handle ipv6” solution for years.

    • interdimensionalmeme@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 days ago

      Thanks that looks like the best I can hope for in terms of disposable, geographically, low cost ipv6 adresses. They give whole /48 so I imagine they expect you to keep using them. Hopefully there is also a way to release the addresses when you’re done with them.

      I was hoping I could route any single ipv6 address to my location but looks like ipv6 doesn’t have as much address portability as I’d hoped!

    • dan@upvote.au
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 days ago

      HE IPv6 tunnels and Cloudflare don’t get along well though, so you’ll hit issues with a bunch of sites. You’ll have a better experience with a $10/year VPS that has a routed /64 IPv6 range.