Receive Wi-Fi via dongle, redistribute via Airport

Solution 1:

Consider the following tutorial

mactip.net

Admittedly it only covers ethernet to wireless or wireless to ethernet, however the same steps should apply for this setup (wireless to wireless).

Make sure of the following:

  • The incoming wireless has a dhcp lease auto assigned
  • The outgoing wireless on the laptop has a manually assigned ip, the subnet matches the incoming wireless, and that the router field is populated with your dhcp server (router)'s ip.

Here is my configuration (I am using an ethernet to wireless bridge but the principle is the same)

Example incoming wireless enter image description here

Example outgoing wireless

enter image description here

Lastly verify that your old laptop has the correct version of the bootpd service running.

 sudo launchctl list|grep bootp
 26987  -   0x7fc881d5b9e0.anonymous.bootpd

Important!

While you will be able to get internet access to any device connected wirelessly to the old laptop, those devices will not be able to communicate with any other devices on the other side of the old laptop.

This is because the old laptop is running a dhcp server and the devices will be in a different subnet.

To prove this, take a look at ifconfig on the old laptop. You should see a new network device called bridge0.

bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether ac:de:48:e4:39:77 
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
Configuration:
    priority 0 hellotime 0 fwddelay 0 maxage 0
    ipfilter disabled flags 0x2
member: en1 flags=3<LEARNING,DISCOVER>
         port 5 priority 0 path cost 0

On my network, all devices that connect to the internet from my 'old laptop' get a dhcp address starting at 192.168.2.x. Those devices can not connect to any device in the 10.4.90.x subnet.

You may be better off buying a wireless repeater, or purchasing a directional antenna for your usb wireless network card.

Solution 2:

It sounds like you're trying to NAT behind your old Macbook. I assume you're using Internet Sharing (System Preferences -> Sharing) to do so, which will auto-configure a NAT for you.

If you are able to connect to the Macbook's shared connection at all you should check the routing table of the machine you are connecting to the Macbook NAT from. You might have a duplicate route, or traffic might be going the wrong way.

You can do this via Network Utility (GUI for netstat). In Network Utility on your client machine go to the Netstat tab, click the radio button "Display routing table information", and then press "Netstat".

If you run an ifconfig on your Macbook, the IP of a secondary interface (br0, tun0, etc OR your internal card - NOT your wifi dongle) should be a local IP - i.e. 192.168.x.x or 10.0.x.x. Ensure that the default gateway in your client machine's routing table is the same as the IP of the network interface that corresponds to your shared connection.

You can change the default gateway via the "Network" System Preferences pane, or using the route command, i.e.

route delete default
route add default <Macbook ip>