Last active
May 30, 2016 17:33
-
-
Save kfigiela/efb6fd928093eff40bc1 to your computer and use it in GitHub Desktop.
Using native OS X NAT with VirtualBox
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>bootp_enabled</key> | |
<true/> | |
<key>detect_other_dhcp_server</key> | |
<integer>1</integer> | |
<key>dhcp_enabled</key> | |
<array> | |
<string>vboxnet0</string> | |
</array> | |
<key>reply_threshold_seconds</key> | |
<integer>0</integer> | |
<key>Subnets</key> | |
<array> | |
<dict> | |
<key>allocate</key> | |
<true/> | |
<key>lease_max</key> | |
<integer>86400</integer> | |
<key>lease_min</key> | |
<integer>86400</integer> | |
<key>name</key> | |
<string>10.0.69</string> | |
<key>net_address</key> | |
<string>10.0.69.0</string> | |
<key>net_mask</key> | |
<string>255.255.255.0</string> | |
<key>net_range</key> | |
<array> | |
<string>10.0.69.50</string> | |
<string>10.0.69.254</string> | |
</array> | |
</dict> | |
</array> | |
</dict> | |
</plist> |
This file contains hidden or 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
sudo /bin/launchctl load -w /System/Library/LaunchDaemons/bootps.plist | |
sudo /usr/libexec/PlistBuddy -c 'add :ProgramArguments:3 string -e' /System/Library/LaunchDaemons/com.apple.pfctl.plist |
This file contains hidden or 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
nat on en0 proto {tcp, udp, icmp} from 10.0.69.0/24 to any -> (en0) | |
nat on en1 proto {tcp, udp, icmp} from 10.0.69.0/24 to any -> (en1) | |
pass from {lo0, 10.0.69.0/24} to any keep state |
This file contains hidden or 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
net.inet.ip.forwarding=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment