diff --git a/tree/.local/nu/macos.nu b/tree/.local/nu/macos.nu new file mode 100644 index 0000000..c9531ac --- /dev/null +++ b/tree/.local/nu/macos.nu @@ -0,0 +1,23 @@ +# Utility commands for macos + +def "net route 4" [ +] { + netstat -rnl -f inet | tail +4 | from ssv -m 1 | into int Refs Use Mtu +} + +def "net route 6" [ +] { + netstat -rnl -f inet6 | tail +4 | from ssv -m 1 | into int Refs Use Mtu +} + +def "net fw rule" [ + --anchor (-a): string +] { + sudo pfctl -sr -a $anchor | lines +} + +def "net fw nat" [ + --anchor (-a): string +] { + sudo pfctl -sn -a $anchor | lines +}