This should be easy, right ?

  • BigDanishGuy@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 hours 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
    6 hours 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.

  • SteveTech
    link
    fedilink
    English
    arrow-up
    7
    ·
    12 hours 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.

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

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

    • dan@upvote.au
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 hours 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.