We're all mostly agreed that security-through-obscurity generally only provides a false sense of security and isn't the real deal. So, what if instead of working around an IP limit with all this complicated technology, the same folks had instead been working on good point-to-point encryption for everything all this time? And, what if all that complexity didn't have to exist in every device? Every line of code increases the likelihood of a security bug, and a network stack with all this extra stuff has a lot of extra lines of code. I dunno if NAT code has been responsible for exploits, but I'd be shocked if it hasn't.
NAT didn't come into common use for security purposes. It just didn't. It came into common use because not every company owns a big enough sub-network for every device to have an IP and no individual household does. It would require completely rewriting history to suggest NAT is and has been used primarily as a security feature.
Certainly, VPNs have a useful purpose other than dealing with the IP shortage of IPv4, but a lot of VPNs at the corporate level are used to tie two private networks together. And, a lot of development has gone into that purpose.
I'm just saying that in a world without a strictly limited set of IPs over the past decade or two, we would likely have a very different looking internet, and I think it'd be a better internet than what we have, because of how much effort has gone into dealing with the complexity of NATted/tunneled/VPNed/etc. networks.
With VPN you have more time in case of an attack, everything is encrypted by default and you only have to watch one basket of eggs.
Yeah, that's the only one where I can see a use for security purposes, but even then, that's not the only reason why it's used.
Yes, you can theoretically migrate everyone to IPv6 and implement some sort of firewall system to block outside access, but now you're effectively duplicating NAT in IPv6. Worse, due to second-system effect you're bound to end up with something even stupider and nastier than the existing stupid and nasty NAT solutions.
> but now you're effectively duplicating NAT in IPv6
No, you are not. If you set up a firewall there still is no translation in IPv6, and it's not needed because the network is end-to-end connected.
> even stupider and nastier than the existing stupid and nasty NAT solutions.
NAT is expensive for both memory and CPU usage, particularly when there is a large number of hosts, and it's not a security feature by itself. In no way can IPv6 with a simple firewall be worse than NAT.
[1]: https://f5.com/resources/white-papers/the-myth-of-network-ad...
[2]: https://blog.webernetz.net/2013/05/21/why-nat-has-nothing-to...
It isn't. The arguments that it is a 'myth' boil down to arguments that it isn't perfect and doesn't protect against every attack. Well, guess what: no security measure is perfect and no security measure protects against every attack.
At the very least, a secure IPv6 network will need to hide end user addresses somehow, because giving everyone a unique, globally-addressable and trackable ID is a security showstopper.
At this point you're going to wonder if you considered all the contradicting requirements properly in your enthusiasm to roll out the next great shiny technology.
Except NAT provides absolutely no security, and complicates your network setup, thus making it more prone to configuration errors and other attack vectors due to complexity.
> At the very least, a secure IPv6 network will need to hide end user addresses somehow, because giving everyone a unique, globally-addressable and trackable ID is a security showstopper.
That is called privacy extensions. Also, it's pointless if you allow cookies in the browser.
But in the end I agree that it's a bit silly to use that as an argument in favor of NAT, if you want a firewall then use a firewall. I guess the advantage of NAT is that while you could forget to setup a firewall and not notice, you'll definitely notice it pretty quickly if you have a few computers on your LAN and you don't have a NAT...
No, it doesn't. Unless by "crappy firewall" you mean "a firewall that doesn't firewall".
> I guess the advantage of NAT is that while you could forget to setup a firewall and not notice, you'll definitely notice it pretty quickly if you have a few computers on your LAN and you don't have a NAT...
... and you could then set up a NAT and still forget the firewall. Especially so if you mistakenly believe that NAT provides firewall functionality. There is absolutely nothing that prevents your ISP, and by extension anyone who happens to compromise your ISP('s router) from connecting to your RFC1918 addresses through your NAT gateway if you don't also have a firewall.
Anyway, I think we're in agreement on the core of the issue, it's just a matter of definition. Praising NATs for security is like praising a snowstorm because it makes it harder to steal my car. I guess some people really like to see the glass half-full.
Well, an unreliable link prevents direct access from the outside to the LAN, except is certain situations!?
Yes, there are certain scenarios of remote access that are prevented by NAT. But they are a lot less than what people generally think. ISPs' networks not being configured particularly securely is not exactly unheard of, from default passwords on routers to broken VLAN setups in FTTC/B/H setups where people could talk directly on the same ethernet to their neighbours' routers. And even if that is all configured perfectly, you still add their network and their staff to your trusted base. That might not be a big concern for home networks, but this subthread was also and in particular about corporate networks, where targeted attacks are much more likely, and in that case, NAT is in no way a "good enough" solution.
1. Somebody on the inside is punching holes for you, then you're already inside and even a firewall would not protect against it.
2. You're hijacking existing connections or sending spoofed packets. That's a vector firewalls also have trouble protecting against.
3. The router NAT implementation might have a defect you can exploit. Because NAT isn't intended as a protection measure, it's implementation might be more likely to have flaws than comparable firewall implementations.[1]
In summary, flipping the NAT switch will give you basic protection much as a basic firewall does. That does not make NAT a good technology. But don't dismiss it just because you don't like it.
[1] Though actually in most cases if you fumble the NAT configuration, you won't have any connections at all. Whereas if you fumble your firewall configuration, your gateway might be open both ways and you don't notice. So NAT is easier to get right. It's not simple, it's ugly and easy!
Your list is missing one point:
4. They just send you a packet addressed to the internal address of one of your devices.
NAT does not prevent inbound connections. A NAT gateway is just a router with additional NAT functionality. When an inbound packet arrives, a NAT gateway will do two things:
1. Check whether the packet belongs to a flow in the table of NATed connections. If so, rewrite the destination address/port to the internal values.
2. Check whether the destination is in the table of port forwardings. If so, add an entry to the table of NATed connections and rewrite the destination port address to the internal values.
Other than that, it's just a router. If it receives a packet from the WAN that is addressed to the LAN, that probable won't match either of those two cases, so it's simply forwarded unchanged.
The only reason why you cannot just send anyone who uses such a NAT gateway a packet to their LAN is because their ISP doesn't route the address range of their LAN to their router. But the ISP or anyone compromising the ISP can just do that.
That is, unless the same device also contains a stateful packet filter firewall. Which you can have without any NAT, with IPv6 just as with IPv4.
NAT does not provide security, really.
A compromised upstream is a whole other league from most threats. At that point you've got to think about physically hardening your network equipment because the people who attack your ISP's network equipment would probably find it worthwhile to sneak into your home to compromise your network directly.
this is a solved problem now. All modern OSes either create short-lived temporary addresses or they hash some machine-unique information with the public prefix (that will change in the same frequency as your current V4 address changes).
It's called a firewall, and you already have one when you use IPv4. The IPv6 one is much simpler, as there's no address translation (NAT).
Unless you don't. In any case that doesn't have anything to do with the technologies they cited, as a firewall was not listed among them.
Running internal services on address space that's not routable on the public internet has its advantages. You can do this with IPv6, but not as easily as you can with IPv4.
It's as trivial as not setting up a route for the address range at your inbound router.
Bonus: If you ever discover that you need to have some service globally routable, it's as easy as adding a route. Try that with your IPv4 NAT setup.
a) Mask end-user addresses somehow. You wouldn't want everyone on your corporate network to get a globally unique, trackable ID.
b) Allow outgoing connections in arbitrary ways but forbid random incoming connections.
c) Some sort of central, highly secured network node where your admins can configure this stuff.
At this point you're close to reinventing NAT, except crappier.
Everyone on your corporate network has tons of globally unique, trackable IDs. They're called cookies.
Also, there are IPv6 privacy extensions.
> b) Allow outgoing connections in arbitrary ways but forbid random incoming connections.
Just as with IPv4?
> c) Some sort of central, highly secured network node where your admins can configure this stuff.
That's called a firewall. You need one with IPv4 as well.
> At this point you're close to reinventing NAT, except crappier.
None of that has anything to do with NAT.
- You can use IPv6 privacy extensions to randomize your IP address. Your computer can have a dozen IP addresses at a given moment, using a different one to access different services, as addresses are being rotated.
- Most corporate networks have static IPs. So while a specific IP might be shared with 100 devices, it's usually easy to fingerprint a visitor uniquely.
- There are tons of other ways to track people, other than their IP. Besides, you want to track them across networks, as they move around.
I'm also very sensitive to tracking, but I think at this point you have to start looking at how to improve your privacy with IPv6, sharing/encouraging good privacy-sensitive practices on IPv6.. not spreading FUD.
b) is a basic feature of the crappiest firewall (the free router from my ISP includes it)
c) is a standard feature of a business-level firewall; secure network access (e.g. with a VLAN) is orthogonal to the choice of IP protocol.
What does that have to do with any of the technologies you cited as being used for security purposes?
Additionally, you could create a setup where every visitor dynamically get a ip address from a pool (shared between multiple websites) when asked over encrypted dns. This kind of setup would clearly be superior over SNI's plain text issue.
All that stuff is mostly done for security purposes, not because we ran out of IP addresses. (And before you reply: yes, it really works and is a valid security tool.)