Share internet from macOS to Wifi Pineapple (Part 2)

Some weeks ago I wrote the first part about Internet Sharing. There we changed the network configuration on the Wifi Pineapple itself. This time we tweak the network configuration (NAT subnet configurations) so that we can use internet sharing on macOS inside “172.16.42.x” network.


Configure Internet Sharing without changing the default settings on Wifi Pineapple (but change defaults on macOS).

Step 1: Prepare for next steps

If you have “Internet Sharing” enabled, now you must switch it off!

Turn on the Wifi Pineapple device and connect via USB (A plug for NANO, ETH plug for TETRA) to your Mac. If everything works fine, following commands should run successful.

# ping device (optional)
$ ping -c 1

# show wifi pineapple network settings (optional)
$ ssh root@ -C 'uci show network'

# start browser session (optional)
$ open

Step 2: Configure default subnet

The property list ( is like a contract between the “Sharing preferences pane” and “InternetSharing”. One important property to set there is “SharingNetworkNumberStart” (all other properties, which follow in this tutorial, are optional). This property controls the behavior of InternetSharing when it configures IP addresses for the local interfaces. I choose value

# read the property list (optional)
$ defaults read /Library/Preferences/SystemConfiguration/

# create backup of the property list file (optional)
$ sudo cp /Library/Preferences/SystemConfiguration/ /Library/Preferences/SystemConfiguration/

# add start IP
$ sudo defaults write /Library/Preferences/SystemConfiguration/ NAT -dict-add SharingNetworkNumberStart

# add end IP (optional)
$ sudo defaults write /Library/Preferences/SystemConfiguration/ NAT -dict-add SharingNetworkNumberEnd

# add network mask (optional)
$ sudo defaults write /Library/Preferences/SystemConfiguration/ NAT -dict-add SharingNetworkMask

Step 3: Network configuration

We will deal with 2 interfaces locally (enX and bridge100). Now we configure the “enX” IP first. We do this simply via “Network preferences”. Depending to your Wifi Pineapple device you should see following services:

  • NANO: AX88x72A
  • TETRA: USB 10/100 LAN

Select the service and configure like in picture.

macOS - Wifi Pineapple IP configuration

Now change the network service order.

macOS - Wifi Pineapple network service order

After saving, we quickly check everything.

# check interface (in my case it's en5)
$ ifconfig en5                
inet netmask 0xffffff00 broadcast

# ping from wifi pineapple (should not work yet)
$ ssh root@ -C 'ping -c 1'
ping: sendto: Network unreachable

# check for interface (should not exist)
$ ifconfig bridge100
ifconfig: interface bridge100 does not exist

Step 4: Start Internet Sharing

Inside “System Preferences”, click “Sharing”, then select “Internet Sharing”. Configure as in picture.

macOS - Wifi Pineapple internet share

Step 5: Set bridge100 interface IP

Back to the terminal, here the interface “bridge100” should be visible now. This interface we assign the IP

# show interface information (optional)
$ ifconfig bridge100

# add IP to bridge100 interface
$ sudo ifconfig bridge100 netmask up

That’s it already! Via “Bulletins” you can verify.

Wifi Pineapple Dashboard

BTW … Take a look at the following local files, with and without Internet sharing!

# read config file for DHCP
$ defaults read /etc/bootpd.plist

# read internet share config (optional)
$ defaults read /System/Library/LaunchDaemons/