Software Routing

j_archer_macg4

Registered
Can anyone please help me?

Is there a way of setting up either OS X or X Server vers. 2 beta as a software router in the same way as IPNetRouter did for OS 9.

I have 2 macs and 2 PC's going through 10/100 Switch and want them all to use a single 56k modem connection on my iMac - is this possible, and if so, how?
 
I would use X not X server. and here's the script I would run (as root) to make it all go. of course your modem is going to have some name other than en0, so put that in place of where I used en0. I don't know what that name would be offhand. Try searching this forum, or doing man on natd or ipfw

#!/bin/sh
##
# Start natd and set ipfw rules to enable NAT
# Built in port upstream exposed, no limits
# To disable this service, modify this file
##
/usr/sbin/natd -interface en0 -dynamic -s -m
/sbin/ipfw -f flush
/sbin/ipfw add divert natd all from any to any via en0
/sbin/ipfw add pass all from any to any
 
Cheers, I forgot to say that I'm new to X, so where exactly would I enter this script and get it to run - would I have to use Dev. Tools?
 
Essentially the problem here is that the solution I gave you is a unix solution to what is now a consumer level problem. Here's the non-unix explanation of how to run that (or any) script.

first, save the text from my last post as a plain text file. Put it in your home directory. For this example I'll assume your script is named samplescript.txt like mine. :)

open a terminal window from an administrator account. The first account on the computer is such an account. type:
sudo su
then enter your password. You are now in su as root, so in that terminal window until you type:
exit
you are root. Be careful what you type now. You override just about anything if you try. Now you need to give the text file you made execute permissions. This can be done from the command line by typing:
chmod ug+x samplescript.txt
now still as root, execute the script by typing
./samplescript.txt
There's a whole lot of unix background before this makes much sense, and more semi-unix wierdness to put this into a startup script. I'll try to do a formal explanation somewhere, but not here, not now. This should allow you to run the script. I'd now recommend you type:
exit
to get the hell outta root. :)

Of course that script routes through your primary ethernet card, not through your modem. I haven't yet figured out what to call the modem, 'cause I don't use one. :) Someone else? help with modem name?
 
... ppp0

I tried the script with no luck, however. I can connect locally, but not even my DNS requests are being FWD'd.
 
Back
Top