Skip to main content
4 of 6
Fixed spelling, capitalization, trademarks, some grammar, and sexism.
Cajunluke
  • 17.7k
  • 7
  • 56
  • 73

Questions about how Internet Sharing works

A simple checkbox and a menu allow you to share your internet connection (no matter which interface you get it on) with any other interface (theoretically). But, the guts of this is a little confusing. This page http://www.manpagez.com/man/8/InternetSharing/ describes InternetSharing, a process which reads the property list com.apple.nat.plist stored in the /Library/Preferences/SystemConfiguration.

First question: Why is the AirPort singled out with its own special entry in the plist? I understand the entries for primary interface (the source) and the sharing devices (the targets) But who cares if AirPort is enabled in this plist if you are setting up a NAT between Ethernet and Bluetooth, for example?

Second question: Why does it allow sharing of Ethernet connection with Ethernet connection and then give you a warning that your ISP will hate you? (It also allows Firewire with Firewire) It doesn't allow Bluetooth to Bluetooth or AirPort to AirPort; the menu entries for self-reference disappear.

Third question: How do you change the default network when you share the Ethernet through your AirPort? InternetSharing configures the IP addresses for non-AirPort interfaces starting at 192.168.2.1 and the SharingNetworkNumberStart property allows you to change that. The AirPort interface by default is assigned 10.0.2.1. How to change?

Fourth question: If you only have one Ethernet jack on a MacBook how could you possibly have more than one interface? InternetSharing configures the IP addresses for non-AirPort interfaces starting at 192.168.2.1, walking up by one class C network (subnet mask 255.255.255.0) for each subsequent interface, i.e. 192.168.3.1, 192.168.4.1, 192.168.5.1, and so on. Is this to address the possibility of a Mac Pro or an Xserve with multiple NICs?