this post was submitted on 26 Feb 2024
59 points (94.0% liked)

Selfhosted

39962 readers
463 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Networking noob here. I want to prevent all incoming requests except through a specific port, and that traffic is forwarded to a specific device on the network. NAT seems to do that just fine, it's almost like a kind of firewall by itself. What kind of threats are there that requires more than just NAT for security?

you are viewing a single comment's thread
view the rest of the comments
[–] MangoPenguin@lemmy.blahaj.zone 3 points 8 months ago (2 children)

For incoming traffic on IPv4 only, NAT technically is fine. But it won't block any outgoing traffic, and IPv6 doesn't use NAT at all.

[–] drkt@lemmy.dbzer0.com 3 points 8 months ago

IPv6 can use NAT; there are some unfortunate souls out there whom are only getting a /128 (one address, basically) by their ISP, instead of a /64 or /48

[–] SnotFlickerman@lemmy.blahaj.zone 3 points 8 months ago* (last edited 8 months ago) (1 children)

and IPv6 doesn’t use NAT at all.

Not entirely true! It uses a type of NAT to translate IPv4 addresses into comparable IPv6 addresses.

For context for other readers: this is referring to NAT64. NAT64 maps the entire IPv4 address space to an IPv6 subnet (typically 64:ff9b). The router (which has an IPv4 address) drops the IPv6 prefix and does a normal IPv4 NAT from there. After that, you forward back the response over v6.

This lets IPv6 hosts reach the IPv4 internet, and let you run v6 only internally (unlike dual stack which requires all hosts having v6 and v4).