Skip to content

Instantly share code, notes, and snippets.

@MichalPekala
Last active August 31, 2017 13:35
Show Gist options
  • Save MichalPekala/9b01a077b9c256b6c04c to your computer and use it in GitHub Desktop.
Save MichalPekala/9b01a077b9c256b6c04c to your computer and use it in GitHub Desktop.
USB armory network sharing on macOS
# enable IP forwarding
sudo sysctl -w net.inet.ip.forwarding=1
# enable PF firewall
sudo pfctl -e
# Option 1: add NAT rule after en4 is up (USB armory already plugged and started)
echo "nat on en0 from en4:network to any -> (en0)" | sudo pfctl -f -
# Option 2: add NAT rule before USB armory is plugged, requires specifying its network
echo "nat on en0 from 10.0.0.0/8 to any -> (en0)" | sudo pfctl -f -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment