2

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.)

1
  • 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)? Aug 24, 2011 at 15:53

2 Answers 2

1

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

http://securityreliks.securegossip.com/2010/10/enabling-ip-forwarding-on-mac-osx/

doing:

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

as root should enable this.

-1

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

eg.

Machine A:
IP address: 192.168.1.1 
Subnet Mask: 255.255.255.0

Machine B: 
IP address: 192.168.1.2
Subnet Mask: 255.255.255.0
1
  • "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
    Aug 24, 2011 at 13:54

You must log in to answer this question.