Today in our newest take on “older technology is better”: why NAT rules!

  • Domi@lemmy.secnd.me
    link
    fedilink
    arrow-up
    19
    arrow-down
    1
    ·
    10 days ago

    Anything connected to an untrusted network should have a firewall, doesn’t matter if it’s IPv4 or IPv6.

    There’s functionally no difference between NAT on IPv4 or directly allowing ports on IPv6, they both are deny by default and require explicit forwarding. Subnetting is also still a thing on IPv6.

    If anything, IPv6 is more secure because it’s impossible to do a full network scan. My ISP assigned 4,722,366,482,869,645,213,696 addresses just to me. Good luck finding the used ones.

    With IPv4 if you spin up a new service on a common port it usually gets detected within 24h nowadays.

    • Forbo@lemmy.ml
      link
      fedilink
      arrow-up
      5
      ·
      edit-2
      10 days ago

      I wouldn’t rely on the size of the address space to provide security. It’s possible to find hosts through methods other than brute force scanning. I remember seeing a talk from a conference (CCC? DEF CON? I can’t remember) where they were able to find hosts in government IPv6 address space (might have been DOD?) through stuff like certificate transparency logs and other DNS side channels.

      Man, I need to go find that talk now…

      Edit: I don’t think this is the one I saw previously but is in a similar vein: https://www.youtube.com/watch?v=AayifEqLbhI

      • Domi@lemmy.secnd.me
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        9 days ago

        Will take a look at the talk once I get time, thanks. If you can find the original one you were talking about, please link.

        For servers, there is some truth that the address space does not provide much benefit since the addressing of them is predictable most of the time.

        However, it is a huge win in security for private internet. Thanks to the privacy extension, those IPs are not just generated completely random, they also rotate regularily.

        It should not be the sole source of security but it definitely adds to it if done right.

    • RecallMadness@lemmy.nz
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      edit-2
      10 days ago

      Could a hypothetical attacker not just get you to visit a webpage, or an image embedded in another, or even a speculatively loaded URL by your browser. Then from the v6 address of the connection, directly attack that address hoping for a misconfiguration of your router (which is probable, as most of them are in the dumbest ways)

      Vs v4, where the attacker just sees either your routers IP address (and then has to hope the router has a vulnerability or a port forward) or increasingly gets the IP address of the CGNAT block which might have another 1000 routers behind it.

      Unless you’re aggressively rotating through your v6 address space, you’ve now given advertisers and data brokers a pretty accurate unique identifier of you. A much more prevalent “attack” vector.

      • Domi@lemmy.secnd.me
        link
        fedilink
        arrow-up
        9
        ·
        9 days ago

        There is this notion that IPv6 exposes any host directly to the internet, which is not correct. When the client IP is attacked “directly” the attacker still talks to the router responsible for your network first and foremost.

        While a misconfiguration on the router is possible, the same is possible on IPv4. In fact, it’s even a “feature” in many consumer routers called “DMZ host”, which exposes all ports to a single host. Which is obviously a security nightmare in both IPv4 and IPv6.

        Just as CGNAT is a thing on IPv4, you can have as many firewalls behind one another as you want. Just because the target IP always is the same does not mean it suddenly is less secure than if the IP gets “NATted” 4 times between routers. It actually makes errors more likely because diagnosing and configuring is much harder in that environment.

        Unless you’re aggressively rotating through your v6 address space, you’ve now given advertisers and data brokers a pretty accurate unique identifier of you. A much more prevalent “attack” vector.

        That is what the privacy extension was created for, with it enabled it rotates IP addresses pretty regularily, there are much better ways to keep track of users than their IP addresses. Many implementations of the privacy extension still have lots of issues with times that are too long or with it not even enabled by default.

        Hopefully that will get better when IPv6 becomes the default after the heat death of the universe.

        • cmnybo@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          2
          ·
          9 days ago

          Since you can have multiple IPv6 addresses on one machine, you can use a rotating address for all outbound connections and a permanent address for inbound connections. If you visit a malicious website that tries to attack the IP that visits it, there will be no ports open. They would have to scan billions of addresses to find the permanent address. All of that scanning would be easily detected and blocked by an IDS.

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

          There is this notion that IPv6 exposes any host directly to the internet, which is not correct.

          TP-Link routers used to actually do this. They didn’t have an IPv6 firewall at all. In fact they didn’t add an IPv6 firewall to their “enterprise-focused” 10Gbps router (ER8411) until October 2023.

    • FrostyCaveman@lemm.ee
      link
      fedilink
      arrow-up
      3
      ·
      10 days ago

      Ahh, woah, I never thought about the huge address space would affect network scans and such.

      With NAT on IPv4 I set up port forwarding at my router. Where would I set up the IPv6 equivalent?

      I guess assumptions I have at the moment are that my router is a designated appliance for networking concerns and doing all the config there makes sense, and secondly any client device to be possibly misconfigured. Or worse, it was properly configured by me but then the OS vendor pushed an update and now it’s misconfigured again.

      • Domi@lemmy.secnd.me
        link
        fedilink
        arrow-up
        5
        ·
        10 days ago

        With NAT on IPv4 I set up port forwarding at my router. Where would I set up the IPv6 equivalent?

        The same thing, except for the router translating 123.123.123.123 to 192.168.0.250 it will directly route abcd:abcd::beef to abcd:abcd::beef.

        Assuming you have multiple hosts in your IPv6 network you can simply add “port forwardings” for each of them. Which is another advantage for IPv6, you can port forward the same port multiple times for each of your hosts.

        I guess assumptions I have at the moment are that my router is a designated appliance for networking concerns and doing all the config there makes sense, and secondly any client device to be possibly misconfigured. Or worse, it was properly configured by me but then the OS vendor pushed an update and now it’s misconfigured again.

        That still holds true, the router/firewall has absolute control over what goes in and out of the network on which ports and for which hosts. I would never expose a client directly to the internet, doesn’t matter if IPv4 or IPv6. Even servers are not directly exposed, they still go through firewalls.

    • dan@upvote.au
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      8 days ago

      Good luck finding the used ones.

      That and the IPv6 address on client systems will periodically rotate (privacy extensions), so the IPs used today won’t necessarily be the ones used tomorrow.

      (you can disable that of course, and it’s usually disabled by default on server-focused OSes)