After you have connected the BeagleBone Black to an iMac via USB cable, and installed the drivers from the BBB on OS X, a new network connection is created which provides tcp/ip to the BBB under the default address 192.168.7.2 over the USB cable.
It sounds natural to extend this connection to the internet. First steps are found again with Derek Molloy, who explains how set a gateway and nameserver in order to have internet access on the BBB, here my version:
#!/bin/sh
echo "Setup script for getting access to the internet via USB - Derek Molloy"
echo "Setting up the default gateway"
/sbin/route add default gw 192.168.7.1
echo "Updating the nameserver entry"
echo "nameserver 213.196.149.11" >> /etc/resolv.conf
echo "Setting the time using the Swiss ntp pool"
ntpdate -b -s -u 0.ch.pool.ntp.org
To extend the BBB network to the internet, OS X provides Internet Sharing. Unfortunately, sharing the internet to the BBB connection does not lead to a working internet connection. The reason is that by default OS X creates the internet sharing to the local network 192.168.2.x, and therefore cannot reach the BBB on 192.168.7.2. There are descriptions how to change this on OS X Lion, but Yosemite seems to work differently, and I haven't found yet a way to change the OS X Internet Sharing default network.
One solution is to change the pf.conf packet filter on the OS X host to provide additional NAT functionality. I didn't like to tamper with the pf settings, so I looked for another solution.
The solution was to change the default IP address the BBB gives itself on the USB interface on startup to match the OS X internet sharing default. This is described nicely by Eric Wong. Of course, the above script must be adapted as well regarding the default gateway.
Now the BBB starts up on 192.168.2.2, and has internet connection from the beginning.