• Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    8
    ·
    2 days ago

    That’s not how that works

    NAT is not a firewall. If you don’t have a Firewall in place bad things will happen.

    For IPv6 you just set your Firewall to deny all and then add exceptions as needed. That is the default pretty much everywhere.

    • 3abas@lemmy.world
      link
      fedilink
      English
      arrow-up
      8
      ·
      2 days ago

      I never suggested NAT is a firewall.

      Your firewall is typically the device doing the NAT (or directly on the router if you’re a home user and don’t have a dedicated hardware firewall). Your firewall/router sits on the edge, exposed with a public IP.

      If you desire to expose your laptop, for example, you setup an ingress rule that translates to the laptops local address, and your firewall/router translates all traffic matching the rule and sends it to the laptop.

      I’m not sure which part you’re not clear on.

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        6
        ·
        edit-2
        2 days ago

        From a network component perspective NAT is not a Firewall. It might run on the same device but it is entirely different function

        A stateful Firewall is what provides the security. That has nothing to do with NAT. You can port forward a service or you can create a firewall exception. They both do exactly the same thing.

        • AA5B@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 day ago

          Sure but the point was that nat allows you to choose private addresses that are by default not routed: the NAT becomes the only way internet traffic can reach your devices

        • 3abas@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 day ago

          The comment I responded to:

          If you have enough IPs then not using NAT makes everything less complicated without any downside to security. If you think otherwise then IPv6 is going to cause you some problems.

          From my reading, it’s asserting that you don’t have to worry about private addressing, which is simply not true.

          And from a net admin perspective, the complexity of NATing ipv4 public to private and exposing ULAs (whether you use NAT66 or NPTv6) is comparable.

          If they just meant you don’t have to worry about the underlying complexity of translating, that’s both technically correct and unhelpful. You already don’t have to worry about that.

          It’s this part that makes it clear to me they meant you don’t have to worry about private addressing at all: “If you think otherwise then IPv6 is going to cause you some problems.”

          And I’ve explained it a few different ways in this thread already, so I don’t want to repeat myself, but they are technically correct in that you absolutely could give every device a public IP, and it would be a headache to manage just like OP’s example, where they give every device an ipv4 address without NATing…

    • derek@infosec.pub
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 days ago

      What’s not how what works? What about the other poster’s comment is inaccurate?

      • 3abas@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 days ago

        Please explain what I got wrong. I’m not perfect, and I might have made a mistake in my explanation, but I don’t think I got the networking wrong…

        With NAT: Inbound to laptop/printer from Internet is blocked by default because there is no globally routable path to them. Devices are only exposed if you intentionally publish: firewall rule + port-forward.

        INTERNET
           |
        [Edge Firewall + Public IP]
           |
        [NAT]
           |
        [Private LAN: 10.0.0.0/24]
           |- laptop 10.0.0.10
           |- printer 10.0.0.20
           |- tablet 10.0.0.30
        

        Without NAT on ipv4, (every device has a pubic IP): inbound to your laptop/printer is blocked by policy.

        INTERNET
           |
        [Edge Firewall]
           |
        [Public LAN: 203.0.113.0/24]
           |- laptop 203.0.113.10
           |- printer 203.0.113.20
           |- whatever 203.0.113.30
        

        Same security if configured properly, NAT just makes it so you don’t even have to worry about a whole class of exposure, because there isn’t a path to block.

        Must be a nightmare to manage the scenario in OP.

        • heyitsmikey128@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          1
          ·
          2 days ago

          I feel like you’re forgetting about subnetting and default gateways. You can’t just route to an internal host if there isn’t a route. That route, if designed correctly, will be behind a firewall that has things subnetter to default deny all for anything “internal” that shouldn’t be publicly routable.

          • 3abas@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            edit-2
            2 days ago

            I’m not forgetting subnetting/default gateways… that’s exactly what I’m describing.

            If you assign public addresses to internal hosts, then by definition your ISP routes that public prefix to your edge, and your edge routes it to the internal subnets. At that point, reachability exists (there is a route); whether traffic gets through is entirely a question of firewall correctness. One bad zone assignment or an overly-broad “temporary” allow can make a host directly reachable.

            With typical IPv4 NAT/PAT, the default posture is different: those internal addresses are not globally routable, and there is no inbound mapping/state unless you intentionally publish something (port-forward/reverse-proxy/VPN). So a lot of “oops” mistakes fail closed. NAT isn’t a security control in theory, but it is a very real operational guardrail against accidental internet exposure.

            And on IPv6: the architecture isn’t “give everything a public IP and call it done.” IPv6 can use global addresses with a default-deny stateful firewall, but the IETF also standardized ULA (fc00::/7) specifically for local communications not expected to be routable on the public Internet.

            IPv4 NAT was largely driven by address exhaustion, but the reason people keep defending “internal is not directly addressable” is the exposure boundary and change-control safety margin it provides, not a belief that NAT magically replaces a firewall.

        • timbuck2themoon@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          1 day ago

          Point being there is still a firewall in place with a default deny. Nothing fundamentally has changed.

          I actually appreciate your diagram because it makes it easy to see. The firewall will not route packets you haven’t expressly opened in both scenarios.

        • Possibly linux@lemmy.zip
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          3
          ·
          2 days ago

          That’s not a situation that is going to arise since devices should block all incoming by default. You could need to explicitly poke holes in the Firewall.

          • 3abas@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            arrow-down
            1
            ·
            2 days ago

            Again, it’s a free way to eliminate an attack surface.

            It’s a situation that can easily arise… you temporarily disable firewall on device to test something, you install a program that exposed a port and don’t realize it, whatever the case, without a public IP that device isn’t reachable from anywhere except the upstream firewall, which requires explicit NAT/port forwarding rules to allow access. Your devices are isolated by default and must be explicitly routed by policy.

            Without NAT/ULA (private ipv6 addresses), your devices are routable by default and must be isolated by explicit policy.

            The point is, you don’t need NAT (that’s exclusively ipv4), but you do need private addressing. That’s the point I was responding to.

            • Possibly linux@lemmy.zip
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 day ago

              What’s stopping you from accidentally port forwarding?

              For that matter, sometimes ISPs route private addresses even though they aren’t suppose to.

            • The_Decryptor@aussie.zone
              link
              fedilink
              English
              arrow-up
              2
              arrow-down
              1
              ·
              1 day ago

              Without NAT/ULA (private ipv6 addresses), your devices are routable by default and must be isolated by explicit policy.

              Yes, that’s where the basic firewall configuration comes in.

              I’m running native v6 at home, with no private addressing (Since it was never implemented right in OSs unfortunately), each system has it’s own public IP address, and even an entirely unsecured device is protected since there’s still a firewall between my network and the internet.