I have the following network setup:

LAN====OSX++++Machine A
        ++++++Machine B

OSX is currently sharing an ethernet connection with A and B via an ad-hoc wireless network. This works great, except that Machine A and Machine B can't see each other. They can see the LAN and OSX, and OSX can see both of them. I'm convinced some combination of ipfw and/or natd configuration options can solve this problem, but my networking knowledge is limited enough that I can't seem to Google effectively for a solution. What do I want ipfw/natd to do for me? How do I get them to do it?

(Obviously, I could solve this problem much more easily by the expedient of purchasing a switch, but I feel like I should know how to do this sort of things regardless.)

  • Can you clarify how the two machines are supposed to see each other (e.g. are they OS X computers with file sharing turned on but not showing up in each others' Finder sidebars)? Commented Aug 24, 2011 at 15:53

2 Answers 2


You need to enable routing. I'm pretty sure on OS X this is a sysctl(like FreeBSD):



# sysctl -w net.inet.ip.forwarding=1

as root should enable this.


Try to enter each computer's address manually in the Network System Preference panel.


Machine A:
IP address: 
Subnet Mask:

Machine B: 
IP address:
Subnet Mask:
  • "Try to enter each computer's address manually in the Network System Preference panel" I utterly fail to see how that could help - the machines already have IP addresses from the Mac. "You need to enable routing." [09:47:02][bmanica@ariel:~]$ sysctl net.inet.ip.forwarding net.inet.ip.forwarding: 1 Already is enabled, and /etc/hostconfig contains IPFORWARDING=-YES-. Still can't ping through the Mac.
    – cbmanica
    Commented Aug 24, 2011 at 13:54

You must log in to answer this question.