Max_P , (edited )
@Max_P@lemmy.max-p.me avatar

That works too. Ultimately they’re all NAT, that’s why they’re in the NAT table to begin with. Masquerade specifically is to rewrite the traffic as if it was originating from the router itself, which can be useful if you don’t know which interface it’ll go out, you just want it to NAT no matter where. SNAT just rewrites the source address so it’s a bit less smart. There’s also DNAT to rewrite where the packet will go. It’s not just addresses either, you can rewrite ports too. There’s also REDIRECT.

Just different ways of doing similar things, but they’re all doing network address translation. For OpenWRT’s purposes it is indeed what everyone thinks of a NAT, the most simple and common one. Past that a GUI becomes more of an annoyance than a feature anyway, so might as well go for scripts or at least raw iptables rules.

There’s also the whole connection tracking system on top of the firewall rules. If you’re clever you can make a load balancer right in iptables, since connection mappings will stick. You don’t have to always rewrite it the same for every packer.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • All magazines