Skip to content

Instantly share code, notes, and snippets.

@legeana
legeana / nftables.conf
Last active May 3, 2025 03:38
nftables port forwarding + wireguard
table inet nat {
chain prerouting {
type nat hook prerouting priority dstnat;
iifname eth0 jump external-pre
}
chain external-pre {
tcp dport 8022 mark set 1 dnat ip to 10.200.200.2:ssh
tcp dport 8022 mark set 1 dnat ip6 to [fd00::2]:ssh
tcp dport 8080 mark set 1 dnat ip to 10.200.200.2:http

Keybase proof

I hereby claim:

  • I am legeana on github.
  • I am legeana (https://keybase.io/legeana) on keybase.
  • I have a public key ASA1fdvqntjAx441bFVohDvZbrYA4VFlGxwIKKfipo_eFAo

To claim this, I am signing this object: