This is related to this question I just asked...

I have two IP address on my iMac I want to "bridge". I'm not sure what the proper terminology is... here's the situation.

My iMac has a firewire connection to my laptop and an ethernet connection to the rest of my office. My laptop has an ip of 192.168.100.2 (on the firewire interface). My iMac has an IP of 192.168.100.1 on the firewire interface, and two IPs, 10.1.0.6 and 10.1.0.7, on it's ethernet interface.

If I wanted to forward all traffic coming in from 192.168.100.2 on my OS X machine to go out on IP 10.1.0.7, and vice-versa, can this be done? I assume I would use the ipfw command.

Essentially I want to "bridge" the firewire network to the ethernet network so my laptop can see all the machines on the 10.1 network, and all those machines can see my laptop at 10.1.0.7. Is this possible?

link|improve this question

79% accept rate
feedback

3 Answers

up vote 1 down vote accepted

Just turn on "Internet Sharing" for the required port(s):

System Preferences => Sharing => Internet Sharing

link|improve this answer
If I do that it involves additional overhead and the computers on the 10.1.0.0 network can't reach the laptop on 192.168.100.2. I'd like to avoid "full" NAT if possible. But it might not be possible. – Josh Apr 9 '10 at 18:56
OK - in that case you may be looking at a commercial solution, e.g. sustworks.com/site/prod_ipnrx_overview.html – Paul R Apr 10 '10 at 6:43
feedback

You can turn on TCP/IP forwarding in OS X by running the following:

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

Note that this may not necessarily be enough to get packets routed to the device properly depending on your network configuration.

link|improve this answer
feedback

I would probably just use the route command from the command line to do the routing.

See the man page here. Basically just add a new route to the desired network through the desired network device. Do the same on the other computer only in reverse. I would also look into what OS X uses to determine the routing metric so you're not completely lost when it doesn't work right away.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.