PDA

View Full Version : Turn Powermac G4 into Router




XnavxeMiyyep
Jul 29, 2008, 10:06 PM
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 (http://www.newegg.com/Product/Product.aspx?Item=N82E16833106122) work?



theyellowdart
Jul 29, 2008, 10:14 PM
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.

XnavxeMiyyep
Jul 29, 2008, 10:28 PM
Thanks for the tips!

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

http://www.newegg.com/Product/Product.aspx?Item=N82E16833127085
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.

theyellowdart
Jul 29, 2008, 10:53 PM
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:


<key>redirect_port</key>
<array>
<dict>
<key>aliasIP</key>
<string>*IP OF YOUR ROUTER BOX HERE*</string>
<key>aliasPortRange</key>
<string>*PORT YOU WANT FORWARDED*</string>
<key>proto</key>
<string>*tcp or udp*</string>
<key>targetIP</key>
<string>*IP OF COMPUTER BEHIND ROUTER HERE*</string>
<key>targetPortRange</key>
<string>*PORT FORWARDED (99% of the time, same as the port you forwarded)*</string>
</dict>
</array>

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.

XnavxeMiyyep
Jul 29, 2008, 11:04 PM
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!

theyellowdart
Jul 29, 2008, 11:35 PM
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?

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

url]http://kbserver.netgear.com/kb_web_files/N100495.asp[/url] 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!

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.

XnavxeMiyyep
Jul 29, 2008, 11:40 PM
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?

theyellowdart
Jul 29, 2008, 11:42 PM
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?

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.

XnavxeMiyyep
Jul 29, 2008, 11:53 PM
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.

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.

CanadaRAM
Jul 29, 2008, 11:56 PM
Just keep in mind that the WindTunnel Mac is going to suck electricity and be noisy. A router is far more energy efficient.

XnavxeMiyyep
Jul 30, 2008, 12:25 AM
Just keep in mind that the WindTunnel Mac is going to suck electricity and be noisy. A router is far more energy efficient.

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)