Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Routing/Internet Connection sharing on OSX Server

Status
Not open for further replies.

normanlafranchi

IS-IT--Management
Jan 25, 2003
12
CA
How does one setup osX server to work as a router, or to share an internet connection among 9 computers if there's a simpler way than using a router.

I've heard this might involve command line programming... hopefully not!
 
If you are running OS X Server, then you need either a hub or preferably a switch to connect the shared machines to unless the server you are using has 10 NICs in it.

Whatever machine you have connected to the 'net must be connected to the 'net and to the switch for sharing.

CCNA student
 
We are already setup infrastructure wise... we have Gig E switches. Currently, the routing is being done by a Windows 2K server until we figure out how to do it with Mac OSX Server.

The OSX server is connected to the network and has another NIC for connection to the Internet.

Ironically, it would be easy on plain OSX, just click on the "share internet' tab. But on OSX server, you have to set it up as a router, but I have no idea how.
 
okay, then one of apple's hidden delights in the 10.3 server, not in the manual or on there site...

To begin with, you need to assign your OS-X computer an IP address appropriate for a private network. Open up the System Preferences, select "Network" and then select the TCP/IP tab. Choose the interface you're going to have the other computers on (genererally ethernet or AirPort), then select "Configure: Manually" to enter an IP address. My understanding is that the following series of addresses is appropriate: 10.0.0.0-8, 172.16.0.0-12, and 192.168.0.0-16 (but i could certainly be wrong). Set the subnet mask to 255.255.255.0. The router settings don't matter. Assign the DNS setting that were given to you by your ISP.

All other computers that will be using the connection should be assigned another IP address in the same series (ie - if you used 10.0.0.0, assign another computer 10.0.0.1), the same subnet mask, the IP number you used in the previous paragraph as the router, and the same DNS addresses as you used in the previous paragraphs.

Next, you have to set up PPPoE and get it connected. If you used Airport for your private network, simply select ethernet and proceed with the normal PPPoE configuration. If your local network is on ethernet, you have to make a second configuration for the ethernet port. To do that, select "Show: Active Network Ports". Once there, select your ethernet port and press "Duplicate" and rename it something memorable like "PPPoE ethernet". Now, select "Show: PPPoE ethernet" and enter the appropriate configuration information.

As part of the current PPPoE implementation, OS-X creates an ethernet interface called "ppp0" whenever you're connected via PPPoE. Since we're going to be routing via this device, we need to make sure it exists before entering all the appropriate commands. To do this, simply connect. From here on out, things should be identical to those for a dialup PPP connection.

All of the following must be done in Admin

open a terminal

type:

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

sudo natd -interface ppp0

sudo ipfw add divert natd ip from any to any via ppp0

There we go the Server setup as a Router....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top