Internet Sharing on OS X
I tried setting up internet sharing on OS X today and it wasn’t as intuitive as you might expect. My Mac Mini is connected to my home network using an Airport connection. I wanted to share that connection through the ethernet port so I could run a VOIP phone in that same room. I turned on internet sharing in the Sharing preference panel expecting that to be all I would have to do, but it didn’t work. It couldn’t find a DHCP server.
I dragged out my laptop so that I would have a better chance of finding out why the DHCP server was there. I connected it to the ethernet of the Mac Mini and still didn’t get a DHCP server. I did some searches on the internet to see if this was a known problem. Apparently, internet sharing isn’t quite as simple as flipping a switch.
The problem with internet sharing is that the computer doing the sharing must have the appropriate IP address in order to share. If your Airport has an IP address like 192.168.1.1, your ethernet IP address must be set to 192.168.2.1. If you have addresses like 10.0.1.1, then the IP address of your ethernet port must be set to 10.1.2.1. It looks like these values are hard-coded by Apple. So if you are connected using Airport and want to share your ethernet, this is what you have to do:
- Go to the Network preferences and see what IP address your aiport connection has.
- Go to the ethernet section of the network preferences and change the DHCP setting to DHCP with manual address. Set the address to the same number as the airport IP address with the last two digits set to 2 and 1 (e.g., 192.168.1.3 => 192.168.2.1).
- Restart/Start internet sharing in the Sharing preference panel
This should get your internet sharing working, but you may still have to change your DNS setup on the computers you are sharing the connection with. They will use your sharing computer as the DNS server which probably isn’t what you want. You should change the DNS values in any client computer to the same DNS settings of the Airport in the computer that is sharing the connection.
Setting this up was actually a bit more complicated than I expected. I’m really surprised that it isn’t documented better somewhere.
