Skip to content

Instantly share code, notes, and snippets.

@pbiernacki
Created November 16, 2016 11:31
Show Gist options
  • Save pbiernacki/fc5b7106a437111380d555d99097b086 to your computer and use it in GitHub Desktop.
Save pbiernacki/fc5b7106a437111380d555d99097b086 to your computer and use it in GitHub Desktop.
ext_if="vtnet0"
jail_net="172.22.0.0/16"
nat pass log on $ext_if from $jail_net to !$jail_net -> $ext_if
rdr log on $ext_if proto tcp to port 8080 -> 172.22.0.22 port 8080
rdr log on lo0 proto tcp from $jail_net to ($ext_if) port 8080 -> 172.22.0.22 port 8080
pass all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment