LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 07-31-2006, 06:02 PM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Using Slackware As a Router In A 486 Box


Hey folks---

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!
 
Old 07-31-2006, 07:55 PM   #2
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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...
 
Old 07-31-2006, 08:14 PM   #3
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 115Reputation: 115
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
 
Old 07-31-2006, 11:41 PM   #4
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
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

...drkstr
 
Old 08-01-2006, 02:48 AM   #5
ppoisson
LQ Newbie
 
Registered: Mar 2006
Location: Lille, France
Distribution: slackware 10.2
Posts: 3

Rep: Reputation: 0
Hi,

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.
 
Old 08-01-2006, 08:32 AM   #6
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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...
 
Old 08-01-2006, 09:49 AM   #7
Slim Backwater
Member
 
Registered: Nov 2005
Distribution: Slackware 10.2 2.6.20
Posts: 68

Rep: Reputation: 15
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.

._.
 
Old 08-01-2006, 09:56 AM   #8
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
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

- Piete.
 
Old 08-01-2006, 10:10 AM   #9
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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?
 
Old 08-01-2006, 10:36 AM   #10
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,776

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
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.
 
Old 08-01-2006, 10:43 AM   #11
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
I stand corrected and bow before your might, Gnashley!

Fantastic project, too (Linux Router Project as suggested) http://pigtail.net/LRP/index.html
 
Old 08-01-2006, 11:06 AM   #12
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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??
 
Old 08-01-2006, 11:10 AM   #13
hrp2171
Member
 
Registered: Aug 2004
Location: California, USA
Distribution: Ubuntu
Posts: 243
Blog Entries: 3

Rep: Reputation: 30
I was going to recommend www.smoothwall.org but they up'ed the requirements to pentium 1 and faster processors.
 
Old 08-01-2006, 06:39 PM   #14
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
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.

Quote:
if you can do an "lspci" on the box and post the output here maybe we could help you out with the config...
Well, this 486 box is completely ISA, therefore I don't think lspci will help---.

Quote:
One note, you may not need a switch if you stuff it with enough NICs.
True, and I only have two workstations.

Quote:
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.
Personally I boot from the hard disk.
That's a good point. I probably would create the floppy image, save that to my hard drive, and later when/if the floppy failed I could then use another oldie to burn a new copy.

Quote:
man, i wish i had a floppy drive to be able to play with right now...
Actually, this box is old enough to have a 5-1/2" drive installed.

Quote:
I was going to recommend www.smoothwall.org but they up'ed the requirements to pentium 1 and faster processors.
Well, kernels can be recompiled . But this approach requires I use a hard drive, which is one of the hurdles I wanted to overcome.
 
Old 08-01-2006, 06:57 PM   #15
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 66
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to build 486 freesco router box jgams Linux - Networking 1 12-04-2004 05:01 AM
VFS root fs problem old 486 router Sid2004 Linux - Newbie 7 10-23-2004 11:11 AM
Can't get my slackware router box to work rude_reality Linux - Networking 3 02-04-2004 01:50 PM
Can ping box to box thru router - good sign? toastermaker Linux - Networking 15 12-07-2003 01:00 AM


All times are GMT -5. The time now is 05:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration