Turn Powermac G4 into Router

Discussion in 'Mac OS X Server, Xserve, and Networking' started by XnavxeMiyyep, Jul 29, 2008.

  1. macrumors 65816


    My router sucks. It really does. So do most of the consumer routers I've ever used. But instead of giving up and spending a huge chunk of cash on an industrial router, I have a better idea. I could turn my old PowerMac G4 into a router.

    The machine is a dual 867 MHz G4 "MDD" / "wind tunnel" with a gig of RAM. It's substantially more powerful than most router hardware, and it already has a wireless card and gigabit ethernet.

    But the thing is, I really don't know how to go about doing this. I'm assuming it'd be best to install some brand of BSD on it (netBSD?), add a few more ethernet ports (I need at least two more total for me and my roommates), and then configure it.

    I know the Power Mac G4 MDD has a few PCI slots, would the Ethernet Cards from here work?
  2. macrumors regular

    Well, you'll probably just need to buy one NIC, and then buy yourself a switch.

    You can use OS X if you want, and it's pretty easy too. I'm going to explain how on 10.5, but it's really not to different on any version of OS X.

    First, install your new NIC card, then connect your modem to one NIC, the switch to the other NIC.

    Go into system preferences -> Sharing. Select internet sharing, share (NIC that is connected to modem) to computers using (Airport, and NIC that is connected to the switch)

    The problem with going this route, (and most computer based routes, be it a *nix system, or windows system) is doing many things, like port forwarding, can be more of a pain than when using a router, and will take some knowledge to do so.
  3. macrumors 65816


    Thanks for the tips!

    Ok. I'm gonna guess that switches will perform better than routers, as they aren't really doing much processing.

    The switch linked here looks good, especially for the price and brand; I guess i don't need 10/100/1000, as the cable internet where I live doesn't seem like it will even approach 100Mbps anytime soon.

    How do I set up port forwarding in OS X? I'll happily use the command line if need be; I just have no real idea what to do, as I've never done much with networking.
  4. macrumors regular

    I had to dig into some of my old notes to find this... I hope it's still relevant (just checked out and the file is in the same place... so we have that going for us :D )

    What you're going to do is edit the systems natd preference file. For OS X desktop it is located in /Library/Preferences/SystemConfiguration/ the file is called com.apple.nat.plist

    This file will hold all the data that natd will use when loaded (natd is the process that is acting as a router). What you will do is add to that file, at the end, this:

                            <string>*IP OF YOUR ROUTER BOX HERE*</string>
                            <string>*PORT YOU WANT FORWARDED*</string>
                            <string>*tcp or udp*</string>
                            <string>*IP OF COMPUTER BEHIND ROUTER HERE*</string>
                            <string>*PORT FORWARDED (99% of the time, same as the port you forwarded)*</string>
    Add a new <dict></dict> inside the <array> for each port you want forwarded. (If you're confused about what I mean there, just ask i'll show an example)

    Also, as for that switch, it will probably be just fine for what you want to do.
  5. macrumors 65816


    Ok, just a few more questions.

    It seems like each computer will need its own port forwarding, or could I just put a * symbol to represent a wildcard?

    http://kbserver.netgear.com/kb_web_files/N100495.asp seems like a good list for now of the ports I'd need, but how do I know whether to use TCP or UDP?

    Thanks for the help so far!
  6. macrumors regular

    How NAT works, you can't use something like a * to forward it everywhere.

    You're really not going to need to forward any ports unless you are running some type of server on the inside. So if you use Bit Torrent, you may need to forward some bit torrent ports. etc etc. However, for regular use, browsing the internet e-mail all that... you don't need to do any of that.

    As for if you should use TCP or UDP. You can typically look up what one it uses by doing aquick google search. If all else fails, make to entries one for TCP one for UDP.
  7. macrumors 65816


    Haha ok! Thanks for all the help!

    Just one more thing (I promise this time :D)

    For wireless, how would I set up a WPA network and limit the MAC addresses?
  8. macrumors regular

    Umm... that one I don't know if you can. What you will do is setup an Ad-Hoc network, but I believe it only supports WEP as the password, not WPA.
  9. macrumors 65816


    Oh, ok. Well, we all have desktops as our primary machines anyway. I guess I could just run an extra ethernet cable or two for guests who want to use their laptops.

    Thanks for everything! I'll be testing this when I return home from work in a couple weeks.
  10. macrumors G5


    Just keep in mind that the WindTunnel Mac is going to suck electricity and be noisy. A router is far more energy efficient.
  11. macrumors 65816


    The noise is not such a concern; I can just put it somewhere out of the way.

    The power is a legit concern I hadn't thought of (this is the first time I've had my own place and bills).

    I guess I won't be able to do this with my Power Mac after all... but all is not lost! When I get a new Macbook in a few years, I can compromise between power and performance (actually, I'd probably get better performance) by using my current Macbook as a router! (I can use an ethernet->{usb2/firewire} adaptor in place of a second NIC)

Share This Page