Use a firewall.
Use a firewall.
Honestly, if you have NAT you almost certainly have a firewall because NAT is nearly always implemented as part of the firewall. It may not be a properly configured firewall, but the functionality is there.
And yes, your little router, is actually a router. It will dutifully take packets from one interface, look at it's routing table and figure where to spit it out. That's what it is supposed to do, NAT just adds a rule that says if a packet comes from eth1 and is destined for 0.0.0.0/0 (default route) out interface eth0 then we (the router) want to masquerade as if we are the source of that packet, so that this entire network looks as if it is coming from one single IP.
No firewall involved, and packets arriving on eth0 are going to get routed to eth1 all the same, since after all, we are a faithful little router.
This is how routing has worked since the dawn of time. Adding a firewall means we can say "but I should never see traffic destined to 10.10.10.0/24 on eth0, so drop it".
---
Either way, NAT may be part of the firewall but there is no requirement for it to be part of the firewall. When it comes to IPv6, just like IPv4, a firewall is required, and as soon as you have a firewall that blocks incoming traffic, then NAT becomes meaningless.
The idea that NAT prevents inbound connections is simply a myth believed by tons of people who have no clue how IP works. It simply doesn't. So you don't need to do any "spoofing" or "manipulation" to "bypass" something that NAT simply doesn't do.
You might as well say that you can bypass a P.O. box by spoofing the destination address and thus effectively manipulating the snail mail routing. No, it's simply the case that you can address letters to street addresses and the postal service will deliver them to the address written on the envelope. Your mistake is in the completely baseless assumption that a P.O. box is supposed to prevent letters from being delivered to your street address.
A stateful PAT would inspect packets to set up port translation and these things used to have lots of bugs and no filtering to check if the packet is from internal or external network at times.
You can often still send to the direct target port and IP if you guess or figure out the mapping. Scanning 64k numbers with packets is not that hard.
But nothing prevents your ISP from sending you packets addressed to RFC1918 addresses. Or anyone who happens to have compromised your ISP('s router), for that matter. Also, it happens that ISPs fail to properly isolate customers, and neighbours who are customers of the same ISP can directly send layer 2 packets to your router. Or it happens that ISPs forget to disable routing protocols on customer-facing ports, and if your router is misconfigured as well, it might be announcing your RFC1918 prefix to your ISP, which then would start routing packets from its other customers addressed to that prefix to you (probably not from other ISPs, as BGP peers usually would drop such routes--but even that is not guaranteed).
It's just a convention to not route RFC1918 addresses over the public internet for the simple reason that they are well-known to not belong to anyone in particular, and in any case your ISP generally wouldn't know who of the many users of those addresses to deliver packets to. I guess that's a bit analogous to writing "to Joe by the big tree" on an envelope and dropping it in the mailbox. That is not a clear, unambiguous address, belonging to one particular person, so chances are the postal service won't know what to do with it and it won't ever arrive. But that doesn't mean there is a guarantee that it won't arrive. Some postal worker might happen to know Joe and that he is known in some circles as Joe by the big tree, and the letter might arrive after all.
There will never be "no firewall involved" because NAT functionality is implemented as part of the firewall in the real world. Your point that it doesn't necessarily have to be part of the firewall is academic.
So, you are telling me that, say, if you configure NAT on a Linux kernel, that necessarily implies some sort of firewall? (hint: it doesn't)
NAT is part of the netfilter module. Pull netfilter out of the kernel and you don't get NAT. It's even configured using the iptables command.
You can configure your firewall to do no filtering, but your packets are still going to be processed by the firewall module. You will still get automatic protections like reverse path filtering for example.
In practice when someone who doesn't know a damn thing about networking clicks the "do NAT" button on their router they're going to at least get basic protections like "No RFC 1918 destinations in on external interface" by default unless their vendor is pants on head. There's obviously more room to screw up if you're manually typing in iptables commands at a bash prompt, but at that point you should know better.
So, if I configure NAT, that prevents inbound connections?
Or are you saying that it implies a firewall that won't filter a single packet, i.e., a firewall that is functionally equivalent to no firewall at all, but that you insist on calling a firewall because it makes you "win the argument" while not contributing anything useful to the discussion?
Yeah, and next I'll be selling cars with an air bag that isn't hooked up. I guarantee you, your head will be processed by an air bag module when you have an accident. So, who are you to claim that my cars don't have an airbag!
What he pointed out is that if you have a firewall you can provide security through that, you don't need NAT or PAT.
In fact having just a firewall is safer, because it is simpler
Which doesn't make it a firewall, just stateful NAT.
> Honestly, if you have NAT you almost certainly have a firewall because NAT is nearly always implemented as part of the firewall. It may not be a properly configured firewall, but the functionality is there.
Not sure what your point is here?!
That a NAT without a firewall would do the job just as well? (no, it wouldn't)
That there is some implementation overlap between the code you need for a stateful NAT and a stateful firewall? (yeah, so what?)
That stateful NAT being implemented and configured on a device guarantees there is also a working stateful firewall? (no, it obviously doesn't)
That there is some security benefit to having the NAT in addition to the stateful firewall? (no, there isn't)
For the user, it's completely irrelevant whether "the functionality is there" if it isn't actually set up to do the job the user requires. And NAT only obfuscates things, as is demonstrated by this very thread: Without NAT, it is trivial to check whether there is a stateful packet filter or not. With NAT, it's difficult to test, and most people obviously aren't even aware that there would be something to test because they think NAT implies a stateful firewall.
In the real world SOHO routers that implement NAT also include the absolute bare bones firewall functionality of "block private addresses on the WAN port". Hand wringing over "but if someone convinces my ISP to route a 192.168.x.x packet to my home it could bypass NAT!" is pointless.
Even if NAT always implied a firewall, that doesn't change that the NAT is not the thing that is keeping you safe. The firewall is what is keeping you safe. That's why you don't need the NAT to stay safe. You can just drop the NAT and keep the firewall and everything will be fine.
You might as well say that a car radio keeps you safe in an accident. Because a car with a car radio for practical purposes nowadays comes with an air bag! Yeah, sure it does, but it's just nonsensical to conclude from that that the car radio is what is keeping you safe. It's not that buying a car with a car radio isn't a way to keep you safe in an accident, it's just that the car radio is completely irrelevant to the problem. Buy the same car without a car radio and you will be just as safe.