Live data from Hacker News

Self-hosting a NAT Gateway

awsistoohard.com

81–90 of 130 posts

Re: Self-hosting a NAT Gateway

#81
post #12

Earlier quoted context omitted.

> I've seen claims of providers putting IPv6 behind NAT, so don't think full IPv6 acceptance will solve this problem. I get annoyed even when what's offered is a single /64 prefix (rather than something like a /56 or even /60), but putting IPv6 behind NAT is just ridiculous.

What is a single /64 prefix not enough for?

Separating out main, guest, work, internet-of-shit, security & VPN subnets

Re: Self-hosting a NAT Gateway

#82
post #80

Earlier quoted context omitted.

Yeah, I keep meaning to write something about this. I've definitely noticed people wary of IPv6 because their machines get "real" IP addresses rather than the "safe" RFC1918 ones. Of course, having a real IP address is precisely the point of IPv6. It's like we've been collectively trained to think of RFC1918 as "safe" and forgotten what a firewall is. It's one of those "a little knowledge is a dangerous thing" things…

In a world where people think NAT addresses are safe because you don’t need to know anything else about firewalls, IPv6 _is_ fundamentally less secure.

In both cases the only consumer security comes from "the home router defaults to being a stateful firewall". The only difference between the two is whether it also defaults to doing NAT with that state, which is not what was making IPv4 secure for people unaware either.

Re: Self-hosting a NAT Gateway

#84

Earlier quoted context omitted.

For company hosting cloud solutions gets you the various compliance stuff for free which can be worth it if you're not too large, and of course faster turnaround if you need to get a product out. For personal a cheap vps will end up costing around the same as something you can do on your own, without the risk of messing up your machine/network from a vulnerable endpont

For free, and 50% or more of your cloud spend.

I'll admit, bit of a poor choice of word,l. But when you need to do e.g. physical security, costs add up quickly over what you'd spend on cloud in say a year, and the compliance companies are usually a huge headache to deal with so that'll be some nice amount of your staff's time lost

Re: Self-hosting a NAT Gateway

#85
post #23

As an OG networking person, developer, and Linux user, the state of modern dev culture just makes me sad. Modern devs are helpless in the face of things I taught myself to do in a day or two when I was fourteen, and they’re paralyzed with terror at the thought of running something. It’s “hard” goes the cliche. Networking is “hard.” Sys admin is “hard.” Everything is “hard” so you’d better pay an expert to do it. Wher…

Bet you never thought you'd have a "when I was a kid" attitude… :)

For those who DID think "I wonder what my 'when I was a kid' will be about when I'm old" what kind of things did you guess it'd be and what did it actually end up being?

I'm only in my 30s but I was thinking recently "when I'm retired I feel like I'm going to be telling stories about how back in my day we had this thing called the filesystem and you'd just browse it directly..."

Re: Self-hosting a NAT Gateway

#86
post #83

I'm not to much into networks, although I've been sysadmin my vps for years. why I would need a NAT Gateway? it's not enough with a good set of rules of ufw or similar software?

This article is ment for companies who want to save a buck on aws costs.

Re: Self-hosting a NAT Gateway

#87

> For those unfamiliar, a NAT Gateway acts as a one way door to your private subnet to access the internet without allowing traffic in Repeat after me: NAT is not a firewall. And we need to stop pretending it is.

But NAT acts as a one way door to your private subnet, doesn't it?

The firewall provides the stateful one way door, the router moves packets between the set of subnets it can see, and NAT makes it so things on the public internet think the conversations from one private address+port combo are actually coming from another public address.

The last part isn't adding the security, and you can absolutely NAT without preventing the "outside" subnets from being allowed to route to the "inside" subnet, it's just that NAT is almost always done on the box providing the stateful firewall too so people tend to think of the 3 functions as combined in concept as well.

Re: Self-hosting a NAT Gateway

#88
post #23

As an OG networking person, developer, and Linux user, the state of modern dev culture just makes me sad. Modern devs are helpless in the face of things I taught myself to do in a day or two when I was fourteen, and they’re paralyzed with terror at the thought of running something. It’s “hard” goes the cliche. Networking is “hard.” Sys admin is “hard.” Everything is “hard” so you’d better pay an expert to do it. Wher…

Bet you never thought you'd have a "when I was a kid" attitude… :)

Man, just this week I had a moment like this that killed me. I had just woken my tweenager up for school and realized I’d turned into the kind of asshole who comes into your room in a good mood at 6 am. Stood in the shower and came to terms with that, but it took a while.

Re: Self-hosting a NAT Gateway

#89
post #79
post #78

Earlier quoted context omitted.

If you think about it, NAT offers pretty much the same protection as a default stateful firewall. Only allowing packets from the outside related to a connection initiated from the inside.

> Only allowing packets from the outside related to a connection initiated from the inside. NAT a.k.a IP masquerading does not do that, it only figures out that some ingress packets whose DST is the gateway actually map to previous packets coming from a LAN endpoint that have been masqueraded before, performs the reverse masquerading, and routes the new packet there. But plop in a route to the network behind and unma…

I have never seen a NAT implementation that forwarded every packet sent to it. As you stated in your first sentence, NAT forwards packets that match previous packets. Assuming it does that job well, that’s filtering right there.

Re: Self-hosting a NAT Gateway

#90
post #79

Earlier quoted context omitted.

> Only allowing packets from the outside related to a connection initiated from the inside. NAT a.k.a IP masquerading does not do that, it only figures out that some ingress packets whose DST is the gateway actually map to previous packets coming from a LAN endpoint that have been masqueraded before, performs the reverse masquerading, and routes the new packet there. But plop in a route to the network behind and unma…

I have never seen a NAT implementation that forwarded every packet sent to it. As you stated in your first sentence, NAT forwards packets that match previous packets. Assuming it does that job well, that’s filtering right there.

> I have never seen a NAT implementation that forwarded every packet sent to it.

* https://kb.netgear.com/25891/What-is-the-De-Militarized-Zone...

* https://support.linksys.com/kb/article/312-en/

* https://www.asus.com/ca-en/support/faq/1011723/

Post reply on HN