Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Mac mini which I'm using to give some other devices wireless access, by sharing it's Airport connection with the local ethernet, and that is plugged into a switch. All devices can get online no problem. (See how: and )

The issue is that I need to be able to connect in to these machines as well (at least, for the Slingbox to work). All the devices have 192.168.2.* addresses, and the rest of my local network is on 192.168.1.*.

I tried setting a static route so that the 192.168.2.* addresses would use a gateway of (my mac mini's address) but that didn't seem to help. Does anyone know if what I'm trying to do is possible? I admit I'm not certain what Internet Connection sharing is really doing under the hood... perhaps it just does basic nat, and doesn't do the type of routing I'm looking for. If so, anyone know if this is possible?

share|improve this question

You might want to take a look to this. The interesting part for you is "How Do I Setup Port Forwarding OS X Router?"

If you want to be able to connect to using SSH (port 22) through your Mac Mini ( you can do :

killall -9 natd sleep 5
/usr/sbin/natd -alias_address -interface en0 -use_sockets -same_ports -unregistered_only -dynamic -clamp_mss -enable_natportmap -natportmap_interface en0 -redirect_port tcp 2222 -l

Then if you do a ssh to port 2222 of your mac mini, you will connect to (In this example I assume your 192.168.1.* network is on en1 and your 192.168.2.* network is on en0)

share|improve this answer
I think I'm close, but it doesn't quite work. /usr/sbin/natd -alias_address -interface en1 -use_sockets -same_ports -unregistered_only -dynamic -clamp_mss -enable_natportmap -natportmap_interface en0 -redirect_port tcp 5001 -redirect_port udp 5001 -l I can telnet in to the slingbox, but it doesn't seem like packets are coming out interestingly, your code sample above has the same interface for the -interface param, and the -natportmap_interface param. The article uses different interfaces. But, for me, neither works. – Tom Lianza Jul 29 '10 at 5:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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