Using Slackware As a Router In A 486 Box
I might (emphasis on the word might) finally be obtaining a broadband connection. Therefore, I'm looking for links and tips for configuring an old 486 (circa 1991) as a router/firewall/gateway using Slackware.
Some things to consider:
1. The box has 16 MB of RAM, a Cyrix 486/586 hybrid CPU, and a 512 MB hard drive.
2. I want only to configure for a router/firewall/gateway. Forget cool projects like adding Squid, etc. I also don't have the RAM for anything more than a router/firewall/gateway.
3. The box is completely ISA. I have 10 Mbps NICs and those cards should suffice just fine because broadband around here doesn't exceed that speed (1-2 Mbps). Thus, since the "bottleneck" is on the internet side, I should be just fine on the LAN side.
4. Here's the primary caveat: I prefer not to use the hard drive. You knew there was challenge, right? :) Those old hard drives are too noisy for my comfort and the BIOS is way too old to recognize any modern quiet drive. Besides, all I want to experiment with is a router/firewall/gateway. I'd like to boot from a floppy, then, if necessary, finish booting from across the network. I know that some dedicated floppy distros still exist and Coyote seems one of the better distros, but I'd like to stick with Slack. I don't know if I can squeeze the bare minimum Slackware onto a floppy, perhaps I need two floppies, but if I can finish booting across the network that should work too. Of course, I expect to recompile the kernel to eliminate fluff (sound, video cards, etc., etc.) and to directly embed drivers.
5. I never have toyed with NFS or tried booting a box through NFS. I seem to recall that there were some how-tos for installing Slack through NFS, so seems my idea might work.
6. I'll need a switch, but I expect to find a used one dirt cheap.
Yes, the 486 box will consume more power than a shelf model router, but after removing the hard drive and other unnecessary cards, power consumption should be nominal. In the end I might buy an off-the-shelf model, but as a temporary project I am tempted to tinker a bit. A WRT54GL would be an easy plug-and-chug solution, but I thought I'd tinker a bit first. Might make for a slick how-to for the web site too ;).
Anyway, I'm just fishing for ideas and conversation. We'll see how things go if I actually obtain broadband!
sounds like you want to make your own slackware-based floppy firewall distro... :)
i think this is super interesting, so my post is a subscription to this thread more than anything...
the first thing i'd do is work on the kernel... you obviously wanna make it as small as possible, so find-out exactly what hardware the 486 box has and then build everything into the kernel, while disabling everything else you don't need... if you can do an "lspci" on the box and post the output here maybe we could help you out with the config...
personally, i'd go for making it with a single floppy instead of two... but that's just me... the idea of having it download packages via FTP or something sounds good, but making everything fit on the floppy would be an awesome challenge!!!
i think what i would do is first make this on a CD... then once i'd have it working well, i'd proceed to move the base to a floppy and script it so it downloads the rest... i'm not sure, i'm just thinking out loud... one thing is for sure, you have a lot of package trimming and recompiling ahead of you... :)
my guess is that with 16mb of ram, you'd want the usage after startup to not exceed 12mb or so... that way netfilter/iptables has 4 megs to work with... might be worthwhile to study how coyote does this...
keep us posted on how this goes man, this sounds super cool... :study:
One note, you may not need a switch if you stuff it with enough NICs. However, I'm not sure if it will be able to handle more than 2 or 3 clients without serious performance issues
hmm, 1.4 mb Slackware distro? Good luck with that, even the boot disk needs 2 floppies. I'm not saying it's impossible however. If I was doing it, I would boot up from the boot disk, then copy the entire ramdisk to a partition on the hard drive (5mb should be more then enough) From there I would try and cut it down to size by removing unneeded stuff. (but I am just thinking out loud as well) Consider this my subscription ;)
I can speak about my pentium 75Mhz / 24 Mo : slack 10.2 works fine with LAMP. So you should succeed to setup it as a router. It is what I used to have in 1995 but with 64 - 128Kbps on the internet side.
Regarding booting on floppy:
I do not know how old are your floppies, but mine are 11 years old (like my PC) and I am not confident with them. I had already to remake one boot floppy due to media read errors.
Personnaly I boot from the hard disk.
I do not know how to make 1 floppy with everything : today I need 3 of them.
Regarding booting via NFS:
It can work if your BIOS support LAN boot. My PC is too old, it does not support this feature and I guess yours too.
So forget it.
Let me know if you want to know more about my configuration.
the floppy will probably end-up having nothing to do with slackware, besides the fact that it was made on a slackware box... what would be the minimum content for the floppy?? i would imagine it would be like a kernel and a ramdisk image with enough stuff to download a tarball via FTP/HTTP/NFS or whatever... man, i wish i had a floppy drive to be able to play with right now...
I'll also add to the crowd that says that whatever you can fit on a floppy won't be close to what makes slackware "Slackware". Bash alone is > 600K. (bash being my preferred shell, while running Slackware). However, check out TomsRtBt http://not.toms.net/twiki/bin/view/Tomsrtbt.
A Harddrive is the way to go, it's worth trying to find one that will work. If not, then you could still try ZipSlack, you should be able to find an IDE ZIP drive around somewhere cheap.
With a machine that old, I would be more inclined to do a network boot. Although you'd need a machine for it to boot from, you should be able to find an ISA NIC with a Boot PROM on it; I'd expect it to be a Novell RBL, but you might be able to replace it with a PXE style ROM.
See if the LTSP has any router type implementations, if nothing else it will get you the details on how to netboot.
Myself, I "recovered" a Celeron 300 with CD-ROM, added dual nics, added Ram to total 384 MB and kept the 8GB boot drive (all at no cost) and use that for my gateway box (running iptables NAT, Squid, MySQL, Apache and PHP). I recently added dual 320s (Software RAID-1 and a seperate PCI IDE controller) and made it a NFS fileserver. I hope that you will find something more modern than an ISA based 486 for this project.
Waaaay back when i was working with windows boxes and had to perform some horrendous quantity of upgrades, we had some PCs without bootable cd-drives, the only way to boot them was from the floppy disk ...
I've since discovered an awesome boot disk that will let you boot an unbootable cdrom drive (http://linux.simple.be/tools/sbm), but at the time, we wanted some automation ...
Iirc the disk booted with network drivers, connected to a remote share and then imaged the PC. Obviously you're not imaging, but, same idea =)
I don't think you can strip enough stuff to have a floppy-firewall-distro on just one disk, but you might be able to use the fact you can boot from floppy to bootstrap a cd-drive (the distro could only be ~6mb, but, it's more than a floppies worth), or better, boot from a network share if you include network drivers in your boot disk ...
Unfortunatly now it's beyond my comprehension, but have a few links anyway =)
Smart Boot Manager (boot unbootable cdrom): http://linux.simple.be/tools/sbm
Bart's Network Boot Disk (boot with network drivers): http://www.nu2.nu/bootdisk/network/
Tom's Boot Disk (rescue disk): http://www.toms.net/rb/
Floppy distro list: http://www.linuxlinks.com/Distributions/Floppy/
Keep us all informed, and I look forward to a wonderful tutorial with us all credited from you, Woodsman ;)
remember that he only really needs the floppy to have enough stuff to be able to download the rest via network... i'm thinking that with a stripped-down kernel and a stripped-down busybox it should fit fine, no?
I once put 4 distros on one floppy! I mean 4 kernels and 4 file systems, each with a single executable.
1 floppy is plenty for a router. Try the Linux Router Project for a ready-made floppy-distro solution which I believe runs diskless.
I stand corrected and bow before your might, Gnashley!
Fantastic project, too (Linux Router Project as suggested) http://pigtail.net/LRP/index.html
but getting back to the DIY one-floppy solution... would i be correct if i said that you could do this by using these three ingredients??:
1 - kernel
2 - busybox
3 - iptables
i mean, i think with those you'd have enough to have the whole thing on one floppy, without any need to download anything, no??
I was going to recommend www.smoothwall.org but they up'ed the requirements to pentium 1 and faster processors. :rolleyes:
Lots of feedback here, so please let me continue the discussion:
Once upon a time I had successfully tested using the 486 box as a router/gateway/firewall, using a dedicated distro. I used the hard drive in that experiment. I even installed Squid, although with only 16 MB of RAM, there was a lot of disk thrashing. I tried connecting a CD-drive but with no success---I installed the distro by temporarily moving the hard drive to a different box. Could have been a bad CD drive, however, and I did not pursue the experiment further.
The old hard drive is terribly noisy, and although some people can roll their eyes, my ears are noticeably sensitive to high frequency noises. (My current box is silent, unless I actually place my ears within 18 inches the box.) Noise is one reason I want to run the 486 box without the hard drive. I could place the 486 box in an another room and run with the hard drive, but for a basic router/gateway/firewall, all of that hardware is overkill. I also tend to think green whenever feasible, and that reason motivates me to run without the hard drive and unnecessary cards :). And if I decided to run with the hard drive, even at 512 MB I could fit a basic Slack installation in that size, which renders this entire thread moot. That project in itself would be sufficient for a nice how-to at my web site, and I'll keep that option open. :)
After posting yesterday I thought of another challenge---the NFS idea probably is not going to succeed. My primary box, probably to the disappointment of some people here, is my Windows NT4 box. I do not always power up my second box which is a Slack-only box. I could look into Samba, however, although I am uncertain of the overhead.
I realize the Slack installation option to use floppies and NFS requires two floppies, but that does not necessarily mean two floppies are necessary for a basic router/gateway/firewall. I am not experienced enough even to guess, however. More importantly, a two-floppy boot would be a PITA and not worth my time or effort.
If I found some old CD drives, eventually I probably would find one that works with this old box. And that option might be my best route. A modern CD roughly holds the same amount of files as the old 512 MB hard drive and is far quieter. However, the BIOS is so old I still would need a floppy to boot. That would be a minor issue, however.
There are many challenges with this idea and that is one reason why an off-the-shelf gadget might be the easiest and most time-effective approach. With a mixed OS environment, the off-the-shelf option provides me a ten minute plug-and-chug solution, although requiring additional buckazoids. The 486 idea appeals to me from an experimental perspective, but if time becomes a primary issue then all of the potential challenges will mean I'll forego the experiment. I sure would like to put the old box to some decent good use, however. Seems a shame that perfectly good hardware sits idle. :( I hate such waste and that this box has been sitting on a shelf for the past several years continues to annoy me.
Personally, I am not experienced enough to design a distro and that is not my intent. I simply wanted to open the idea to discussion of using the Slack concept of an operating system as a basic router/gateway/firewall in a 486 box. My desire to "use" Slack is simply that I prefer to continue using the BSD-like approach of Slack, as well as my familiarity with existing scripts, etc.
I mentioned Coyote. Thus a one-disk solution already exists. There also is Tom's Root Boot, which, should provide additional ideas.
I'll investigate some of the older floppy-based projects. Possibly from there I can tweak things to the way Slack works with BSD-style scripts, etc. A significant difference, of course, with those older distros and those of today is the size of the kernel. I know from the limited compiles I have performed that there is indeed many options that can be disabled to reduce the size of the kernel. I prefer to stick with a 2.4 kernel, but I lack the experience to gauge how much I can reduce the size. Most of the floppy-based projects disappeared with the transition from the 2.2 to the 2.4 kernel.
If I pursue this idea I likely would first experiment on my existing Slack box. At least with tinkering the basic kernel compile and testing which software and scripts I needed. I would create an additional partition. I then would have a basic idea of size limitations.
I already have a copy of the Bootdisk and From Power Up To Bash Prompt how-tos, which provides a nice overview of this kind of thing. And there are additional links in this thread to follow.
I appreciate the feedback and commentary. If I do obtain broadband (finally---woohoo---I can join the 21st century!) in the next few weeks, I'll be more than content for a while to simply connect one box to the net. FWIW, I already have my Slack box configured to serve as a gateway/router/firewall in addition to being a workstation. Occasionally, when I find time to tinker, I boot and connect both boxes to the web this way.
This 486 project would be relegated to the "winter project" list. I'll remain undecided what I'll do until after I obtain broadband, but I'll keep people posted if I start tinkering. In the mean time I'll keep watching this thread for additional ideas and comments.
The way I did it with my old 486 box was to install a ide controller. That way I could use the larger hdd and cdroms
|All times are GMT -5. The time now is 01:31 AM.|