Skip to content

Instantly share code, notes, and snippets.

@prologic
prologic / PortMapping.md
Last active April 26, 2025 22:51
NFTables Port Mapping Example
  1. Create a table named nat with the ip address family:
nft add table ip nat
  1. Add the prerouting and postrouting chains to the table:
nft -- add chain ip nat prerouting { type nat hook prerouting priority -100 \; }