http://apple.stackexchange.com/questions/73485/internet-sharing-from-wifi-to-ethernet-doesnt-work-in-mountain-lion

internet sharing on mountain lion breaks routing

netstat -nr

sudo route -nv delete default

sudo route -n add default 192.168.1.1

Add DHCP server in osx

http://www.jacquesf.com/2011/04/mac-os-x-dhcp-server/

Create /etc/bootpd.list

<?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>
    <false/>
    <key>detect_other_dhcp_server</key>
    <integer>1</integer>
    <key>dhcp_enabled</key>
    <array>
        <string>en0</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>192.168.33</string>
            <key>net_address</key>
            <string>192.168.33.0</string>
            <key>net_mask</key>
            <string>255.255.255.0</string>
            <key>net_range</key>
            <array>
                <string>192.168.33.2</string>
                <string>192.168.33.254</string>
            </array>
        </dict>
    </array>
</dict>
</plist>
  • Start the server:

    • sudo /bin/launchctl load -w /System/Library/LaunchDaemons/bootps.plist
  • Stop the server

    • sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/bootps.plist

Static IP assignments

Create /etc/bootptab

%%
# machine entries have the following format:
#
# hostname      hwtype  hwaddr              ipaddr          bootfile
client1         1       00:01:02:03:04:05   10.0.0.20
client2         1       00:a0:b2:ef:ff:0a   10.0.0.20

https://library.linode.com/networking/openvpn/ubuntu-12.04-precise

changed May 27, 2014