-
-
Save diegograssato/483e7a5f7e9fc58a6a3a1c158c419374 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