Last active
April 13, 2017 20:48
-
-
Save davidhamann/8703e111a2907e49610ed5c1ac459f21 to your computer and use it in GitHub Desktop.
Forward VPN traffic on macOS >=10.11; Create nat-rules load file first. Then, from other Mac, set gateway address to the Mac with the VPN running. Et voilà!
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/sh | |
sysctl -w net.inet.ip.forwarding=1 | |
sysctl -w net.inet.ip.fw.enable=1 | |
pfctl -f ./nat-rules -e | |
# nat-rules could look like this: | |
# nat on utun0 from en0:network to any -> (utun0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment