Created
March 2, 2018 18:27
-
-
Save retspen/4e6ec73271594399c050f6f8027a9880 to your computer and use it in GitHub Desktop.
Enable NAT on macOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat > /usr/local/etc/pf-nat.conf << EOF | |
nat on en0 from vnic1:network to any -> (en0) | |
EOF | |
sudo pfctl -d | |
sudo sysctl -w net.inet.ip.forwarding=1 | |
sudo pfctl -f /usr/local/etc/pf-nat.conf -e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you, Sir