6 ms·
[preemptive response: no, NAT does NOT provide any security benefits. NAT just rewrites packet address/ports. NAT automatically prevents attackers from scannin
by userbinator 7y ago
[preemptive response: no, NAT does NOT provide any security benefits. NAT just rewrites packet address/ports.
NAT automatically prevents attackers from scanning for and attacking listening ports on the hosts behind it. Given that those who want a service to listen to the Internet should also know enough to forward the ports, I'd say it's a pretty important security benefit and one that has greatly slowed the spread of worms.
Can I send GET requests to your router with a webpage full of hidden/obscured img tags
That requires extra action on the part of the "attackee", whereas without NAT the attacker would be able to directly connect to a port, to any machine anywhere on the Internet.
- ikiris 7y agoNo, it doesn't. It. Does. Not. At all
- Godel_unicode 7y agoThere are an awful lot of home installations of Windows XP that aren't going to get exploited by BlueKeep because of NAT not forwarding 3389 to them.
- wbl 7y agoAnd a firewall would do the same thing.
- Godel_unicode 7y agoIf configured correctly, sure, that's why I use one. I also realize that most random people don't have the technical savy to configure one to be anything other than effectively a NAT gateway. The fact that something else can also provide that security benefit in no way means that NAT doesn't provide some security benefit. It does.
- rohan1024 7y agoThat was a fault of OS and they should have fixed it. Network protocols and equipment is not responsible for OS security issues. This NAT'ing for security has practically left the Internet broken. We are permanently dependent on Server to route packets to other client.
- Godel_unicode 7y agoNow you're moving the goalposts, though. Saying that the network shouldn't play a role in security is totally different than saying that it currently plays none. I find it really hard to understand this obsession with pining for a world where security doesn't need to exist. It does, and it always will. Design around that, it's not hard.
- pdkl95 7y ago> pining for a world where security doesn't need to exist Nobody is doing that. We're "pining" for a world where our devices can have direct phone numbers instead of having to share a party line. Unfortunately, some people keep insisting that requiring households, businesses, or larger groups of people (i.e. CGNAT) to share a single phone number keeps everyone safer because it keeps most people from being able to receive incoming calls. See my other post[1] for the technical reasons NAT doesn't actually provide security. TL;DR - this is a problem of definitions and a common misunderstanding about how NAT/routing works. In the telephone analogy, I'm trying to say that you phone lines sh0uld have their own individual telephone numbers, because you might need them some day. Not having the ability to receive incoming calls will eventually limit you in important ways. "But incoming calls can be dangerous! Why are you trying to making us less secure?" We're not increase your options, which doesn't affect your security. Since incoming calls are dangerous, just disable your ringer or use a firewall that simply blocs all incoming calls. [1] https://news.ycombinator.com/item?id=20181274 https://news.ycombinator.com/item?id=20181274
- Godel_unicode 7y ago> See my other post[1] for the technical reasons NAT doesn't actually provide security. You're just as wrong now as you were then, see my up-thread post to correct your misunderstanding about security. Edit: either direct addressing isn't possible with NAT, which provides security benefits, or it is possible, which means your complaint is mis-placed. It cannot simultaneously prevent direct addressing and provide literally no security benefit.
- lmm 7y agoNo, it would be straightforward for a worm to figure out what internal network addresses they were using, what routers there were behind, and send packets to those routers whose destinations were those internal network addresses (192.168.1.2 or whatever). NAT does nothing to stop that. Most routers won't forward those packets. But that's got nothing to do with whether those routers are running NAT or not.
- Dylan16807 7y agoStraightforward? How do you send a packet with the wrong IP to a machine on the other side of the internet?
- Godel_unicode 7y ago> Most routers won't forward those packets. Good, we agree this is a pointless hypothetical which will never work. That does beg the question why even bring it up, though...
- lmm 7y ago> Good, we agree this is a pointless hypothetical which will never work. That does beg the question why even bring it up, though... Well you're the person best placed to answer that, since you brought it up.
- deleted 7y ago[deleted]
- pdkl95 7y ago> NAT automatically prevents attackers from scanning for and attacking listening ports on the hosts behind it. That the firewall, not NAT. NAT on it's own - without a firewall, a very unusual configuration - will route packets to your "private" addresses if that address is in the packet's DST address field (maybe; it depends on the rules the router uses when deciding how to rout a packet, which is also not NAT). NAT is only about changing the address field. RFC 2663 even recommends that NAT should usually be "used in conjunction with firewalls to filter unwanted traffic". Unless you're referring specifically to changing the address/port fields in the packet header, you are probably referring to a stateful firewall. That's the feature that is usually responsible for dropping packets, preventing scanning of your LAN. TL;DR - address translation (NAT), and choosing what to do with a packet (firewall, routing rules) are separate, independent features. NAT - by itself - isn't really involved in routing/firewall step. That's why it's extremely unusual to see NAT in isolation. The thing you see on e.g. most home routers is basic use of NAT combined with a simple router and (hopefully) a powerful stateful firewall. > should also know enough to forward the ports That's nice iff you get to decide which ports are forwarded. Good luck getting a carrier to forward ports. It isn't going to happen if you're in some parts of China behind 7 layers of NAT. Port forward in that situation would be a nightmare, assuming it was even theoretically possible to convince the 7 upstream authorities that they should forward a port to you. However, minutia about port forwarding doesn't address my main point: that NAT limits the type of software that is developed. Are you really going to write a network app that only works if people setup port forwarding? Would business use telephone for as many purposes if phone numbers were all shared party lines? > That requires extra action on the part of the "attackee" That "extra action" is probably the most common vector of infection for modern malware. Ignore it at your own peril.
- Dylan16807 7y ago> route packets to your "private" addresses if that address is in the packet's DST address field And how does such a packet make it to your router, exactly? I disagree that it's "the firewall" doing the real work here. If things are configured properly, a firewall should be 99% irrelevant.
- johncolanduoni 7y ago> NAT automatically prevents attackers from scanning for and attacking listening ports on the hosts behind it. Given that those who want a service to listen to the Internet should also know enough to forward the ports, I'd say it's a pretty important security benefit and one that has greatly slowed the spread of worms. So does a few lines of iptables (which work just as well with IPv4), which even most ISP routers that support IPv6 have managed to get right. On the other hand the workarounds for when you actually do want to accept connections through a NAT (cough UPnP) have been consistently misconfigured or had implementations which are simply vulnerable.
- Dagger2 7y agoNAT does nothing of the sort. Here's NAT, as implemented on a Linux machine: `iptables -t nat -A POSTROUTING -o wan0 -j MASQUERADE`. You see that "-o wan0" there? That means the rule only applies to outbound connections, and it does nothing whatsoever to inbound connections. How can a rule that doesn't apply to inbound connections possibly do anything about the behavior of inbound connections? On the other hand, v6 does do something about the spread of worms: networks use 64 bits of address space, so it's difficult to even find an active network host by scanning. On v4, you can find all active vulnerable hosts by just trivially scanning the entire 32-bit address space. An exhaustive search of a /64, which is just one single network, requires 0.9 ZB of traffic. (Of course there are other ways of finding active hosts, and being obscure doesn't make the hosts in question secure -- but it _does_ render network scanning as a tool for spreading worms more or less obsolete.)
- Dylan16807 7y ago> How can a rule that doesn't apply to inbound connections possibly do anything about the behavior of inbound connections? Outside of exotic situations, part of setting up a NAT is putting your internal hosts on a private IP range. This makes inbound packets impossible (if your ISP didn't screw up). Even if you didn't do that, all you have to clarify is that you're replacing the existing routing rules with NAT. Mystery solved.
- Dagger2 7y agoDue to the extreme address shortage in v4, of course it's typical to be putting your internal hosts on a private IP range. But "putting your internal hosts on a private IP range" isn't NAT. And in fact, putting your internal hosts on a private IP range doesn't prevent inbound connections either. It'll limit the set of people that can do them, but anybody on your immediate upstream connection can do it just by sending packets to your router. That probably means at least your ISP and anybody who can order them to cooperate. NAT isn't a security boundary. (And if you replace your routing rules with NAT then everything will break, because the only thing NAT does is rewrite addresses in packets. They still need to go through the routing table to be routed.)