5

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?

Josh
  • 9,947

3 Answers3

1

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

System Preferences => Sharing => Internet Sharing

Paul R
  • 5,708
0

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.

0

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.

Nitrodist
  • 1,638