Skip to content

Instantly share code, notes, and snippets.

@zeroby0
Created September 17, 2024 13:19
Show Gist options
  • Select an option

  • Save zeroby0/8a91920102c0b2372fd7ff545943da92 to your computer and use it in GitHub Desktop.

Select an option

Save zeroby0/8a91920102c0b2372fd7ff545943da92 to your computer and use it in GitHub Desktop.

Revisions

  1. zeroby0 created this gist Sep 17, 2024.
    30 changes: 30 additions & 0 deletions nftables.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    #!/usr/sbin/nft -f

    flush ruleset

    table inet filter {
    chain input {
    type filter hook input priority filter;
    }
    chain forward {
    type filter hook forward priority filter;
    }
    chain output {
    type filter hook output priority filter;
    }
    }



    table ip relay {
    chain forward {
    type filter hook forward priority filter; policy accept;
    iifname "enp6s0" oifname "wlp7s0" counter accept
    iifname "wlp7s0" oifname "enp6s0" ct state established,related counter accept
    }

    chain postrouting {
    type nat hook postrouting priority filter; policy accept;
    oifname "wlp7s0" counter masquerade
    }
    }