Live data from Hacker News

Self-hosting a NAT Gateway

awsistoohard.com

11–20 of 130 posts

Re: Self-hosting a NAT Gateway

#11

I build my own NAT instances from Debian Trixie with Packer on AWS. AWS built-in NAT Gateways use an absurdly outdated and end-of-life version of Amazon Linux and are ridiculously expensive (especially traffic). The bash configuration is literally a few lines: cat /dev/null net.ipv4.ip_forward=1 EOF sudo sysctl --system sudo iptables -t nat -A POSTROUTING -o ens5 -j MASQUERADE sudo iptables -F FORWARD sudo iptables -…

OpenWrt is also a good option.

Re: Self-hosting a NAT Gateway

#12
post #9

Please can we do away with NAT forever. Why are we still encouraging this? It’s caused the world to do horrible kludges and continues to do so.

1.) IPv4 is still heavily favored over IPv6. 2.) Market segmentation: keeps home users from easily hosting their own services without spending $$$ on an upgraded plan. 3.) Adding on to #2, I've seen claims of providers putting IPv6 behind NAT, so don't think full IPv6 acceptance will solve this problem.

> 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.

Re: Self-hosting a NAT Gateway

#14

It's honestly ridiculous that people now see that self hosting is stupidly cheaper and still 99.9% reliable. No your service does not need the extra .099% availability for 100x the price... Make your own VPN while you are at it, wireguard is basically the same config.

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

Re: Self-hosting a NAT Gateway

#17

I don't know what is the point of this kind of article. People care the cost and can do it already do it. It is a damn service, which is defined as "you pay someone to do it".

I do both: charge people to do it for them and do it for myself.

(your second sentence is a bit confusing)

Re: Self-hosting a NAT Gateway

#18

I can't believe people are paying these crazy amounts for what is basically a fleet of firewalls. What is the difficulty in running VMs with nftables rules?

1) You can't `npm install` it, which is a huge barrier to entry to the modern breed of "engineers".

2) Companies will happily pay thousands in recurring fees for the built-in NAT gateway, but if an engineer asks for even half that as a one-off sum to motivate them to learn Linux networking/firewalling, they'd get a hard no, so why should they bother?

Re: Self-hosting a NAT Gateway

#20

Please can we do away with NAT forever. Why are we still encouraging this? It’s caused the world to do horrible kludges and continues to do so.

Because it's never once inconvenienced the average network admin, probably. I still don't get what problem it's supposed to solve for me.
Post reply on HN