Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fbion/78881316d3d6c51e9dff7e00f92897ca to your computer and use it in GitHub Desktop.
Save fbion/78881316d3d6c51e9dff7e00f92897ca to your computer and use it in GitHub Desktop.
PF rules sshuttle
table <exclude_subnets> {200.152.40.0/24,127.0.0.0/8,10.0.0.0/8}
table <allowed_subnets> {!200.152.40.0/24,!127.0.0.0/8,!10.0.0.0/8}
table <include_subnets> { 0.0.0.0/0}
rdr pass on lo0 proto tcp to <include_subnets> -> 127.0.0.1 port 12300
pass out route-to lo0 inet proto tcp to <include_subnets> keep state
pass out route-to lo0 inet proto tcp to <exclude_subnets> keep state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment