Internet Gateway & DHCP Server on OSX?

knighthawk

Registered
I need to run an Internet Gateway to allow all of the computers at work to get through to the internet. I want to setup a Vitual Private Network (192.168.1.#) and DHCP (but that is not as important) running off the OSX iMac that I have running (limited to one ethernet). This iMac has a static IP, and I would like to host a website on it as well.

Is this possible with OSX? I have been looking at a few Linux Howto's, but most of them are written for Red Hat, and they require recompiling of the kernel (which I don't even know is possible with OSX). Most of them also require two ethernet cards (which is not an option here).

I just want to know if I am going to be spinning my wheels on something useless or if I should just go out an buy a Linksys (or similiar) internet gateway box.

Thanks

---------------------------------------------
iMac: 266mhz, 128mb ram
OSX 10.0.4
 
What you want to do is very popular with os x. However, it really isn't practical, especially with only one ethernet interface, and dhcp.

But if you want to do this, I think you need ipchains and ipforwarding. It is probably worth the time to read those cryptic how-to's some more, such as the ones at http://www.linuxfirewall.com .

However, as with OS 9, some utilities will be poping up soon that will do this for you.

Wait a sec, ignore the upper half of my post, I checked, and there is one.
http://www.apple.com/downloads/macosx/networking/gnat.html

hope that helps.


http://www.apple.com/downloads/macosx/networking/gnat.html
 
Let's see, an internet gateway, VPN, DHCP, and a web server, with one machine that has one ethernet adapter. Hmm....
I think what your looking for knighthawk is a Cuisinart.
 
Create your external connection with the public IP addresses you have in the Network control panel. Then open up the terminal and type the following

ifconfig eno alias 192.168.0.1 netmask 255.255.255.0.

This creates an alias for your local network.

Now you need to turn on NAT on the required port.

/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

This gives you no firewall protection.

Then configure DHCP in the OS X Server Admin control panel giving the router address as your machines local port ie 192.168.0.1

This should work on a single e'net port set up.

I have used gnat before but it didn't work for a machine with a single e'net port
 
you said server....

I am running OSX standard. Eventually, I may buy the server package, but that is not an option for me right now.

I have used a Linksys DSL router in the past, and it is very easy to use. Only costs $100 ($140 if you want the 4-port hub). Has built-in limited-firewall, DHCP and routing, and my favorite... port routing.
 
I am confused, you want to use OS X for DHCP, routing and a firewall -- AND -- you have a Linksys DSL router. The Linksys router does all of this for you. That is the whole reason why someone purchases these home network routers. If I am understanding you correctly that you already have a Linksys DSL router - then plug the DSL connection into the router on it's designated port. Then plug in all computers that you want to have internet access into the router. Linksys will assign every computer a unique IP (through the use of it's DHCP). It has a built in firewall protection for the network (so you will not need some type of software based firewall). It's good to go.


frooyo

___________________________________________________
 
ok... i have two different networks that I work with all the time. One is my network at home (that uses the Linksys Router). The network that I am asking these questions about is the network AT WORK! =)

What I have found with the Linksys router is that it is not the most stable... I have to press the reset button at least once a week, otherwize it cuts off all network traffic to the outside world. Obviously that is not acceptable for a business network that hosts several websites and ftp.

I am just trying to find the best solution for the budget (which is maxed right now). I am responsible for setting everything up, but I am still learning...

I knew that UNIX boxes in general can act as a router/firewall for other machines in the network, but was not sure if I could even set it up on Mac OSX (standard). That was the whole purpose of this thread.
 
Using Mac OS X to use as a gateway for the other machines on the network is as easy as configuring gNat

http://www.frognet.net/~lachman/

Allows you to share with one or two NICs. You can resort to CLI, but GUI configuration tools are preferable IMO.

----
the post of 1000 acronyms
 
Back
Top