Building a home Linux router (freesco)

  1. take your old doorstop type computer (ie 386, 486, low end pentium) and take the cover off. Remove the hard drive, and sound cards, any other extraneous devices that are in the machine. Leave a single 1.44 meg floppy drive in the machine, and whatever video card you have in there. Obviously leave the motherboard and memory in there :-)

  2. next, determine how much memory is in the computer. (usually powering on the computer will quickly tell you what is in it). I recommend having at least 16 meg in the computer. FreeSCO runs off of a ramdisk of memory, and you can add additional features if you have more than 16 Meg of memory.

  3. One additional thing you can do. If you can find an old ega/cga monitor and video card, replace the one in the router with them. Those old monitors are junk as far as most people are concerned, so you can get them for free. I have several of the old monitors and have given several to members of NOLUG for their use.

  4. Ok, so now we have a lean mean FreeSCO machine!! NO extra bull in the way, just what is needed. Now we need to move on to the bios setup on the machine. If you have a really old 386 or 386sx, then there may not be any settings to change in the bios, nor a way to get to the bios. Most 486 and all low end pentiums have a way to get into the hardware settings, or bios settings. On different computers it is a different key combination to get in. If your computer has Pheniox bios, more than likely you need to hit F2 while it is booting to get into the bios. Most, if not all Award bios use the del key to get into the bios. Compaq computers (just to be obnoxious and hard to deal with) use F10. There were some older bios that required you to hit cntrl-shift-esc, or cntrl-enter, or some other weird combination of keys. If your machine doesn't show a hit **** to enter setup at boot time, then try to look up the motherboard on the web and see what the key combination is set to on that variety of bios. Ok, so now we are in the bios. What now??? look around the bios and find any settings that are turned on and determine if you need them (at this point you may want to ask for help from someone if you are not familiar with bios terms). Things that you should turn off completely: that annoying power management crap. Remove any reference to a hard drive and set all the hard drive settings to not installed. If there are any strange devices like built in modems on an old packard bell, turn them off. I usually turn off all the serial ports and parallel ports too. Turn off any embedded device you don't need, which on a freesco router for your home, you won't need any of them. Make sure your 1.44 meg floppy is set to be Drive A, or the boot drive. Also, if your computer has the ability to select the boot order, make sure the floppy drive is the first boot device, since it will be the only bootable device in the computer.

  5. Now we have our LMFM with all the junk stripped, the bios set to not operate any extra junk, and we are ready to start on the network cards. As I talked about above, we go through the setup routine of one card at a time if they are ISA cards. If they are PCI network cards, 3com, or dlink novell compatables, then we just shove them in and start configuring the router. But for the older cards make sure they are configured correctly and NOT conflicting with each other.

  6. Now comes the meat of the subject. Our machine is physically together and ready to rumble on your cable/dsl. Go to www.freesco.org or www.freesco.com and download the 1.44 meg boot image. Once this is downloaded to your drive, then you need to write it to a floppy. If you are on a windows box, download rawrite, or rawrite2 to your machine and use it from a command prompt. If you are on a linux machine then use dd to make the disk. The format for the commands are as follows:
      dd if=1.44imagename.ext  of=/dev/fd0
    this will write you a floppy disk in your first floppy drive on your linux machine.
      Rawrite [enter]
      name of image file?:   1.44imagename.ext [enter]
      destination drive?:   a: [enter]
    this will write you a floppy in your drive a: of your dos/windows machine

  7. Now that you have your bootable freesco disk in hand, we are ready to play and configure the router. Put your floppy in your newly built router and turn it on. When it gets to the boot prompt, type setup and hit enter. This runs the setup routine to configure the router for the first time. Now it will pop up a menu that shows you some different things. Just hit enter and go to the next screen. You will see a listing of all the difffent types of configs you can set up a freesco to do. We will be concerned mainly with (e) an ethernet router between your network and either a cable or dsl modem. Hit e and then it will go through many questions about your setup. Remember the sticky or tape I told you to put on the outside of the case of your router??? One of the first questions you will be asked is what is the I/O address of your first network card, or eth0. Chose the card with the lowest I/O number for the first interface. Put in the I/O, then it will ask for the IRQ. Next it will ask you for the second i/o and irq of the second interface, eth1. Enter these numbers, then the next question is do we want to use DHCP to configure the first interface?? Now this answer depends on your service provider. If you have a static ip address assigned to you by your isp, then just enter the ip address they gave you into the config. Now if you are running telocity, or one of the service providers that give you a modem that does dhcp for you, then you tell it yes and let it configure itself. With Telocity, you have a static ip address, but internally, the telocity gateway modem does DHCP. What it does is it has ONE ip address to give, and always gives that same ip address to your router.

  8. Next it will ask you about what ip address to use for the eth1 or second network card. Now the answer to this question depends on the tcp/ip class from the last session. Hopefully you have chosen a valid ip addressing scheme for your internal network of something like 192.168.1.0/24. For this example, let us assume you did this. The normal numbering convention is to make your router, or default gateway of your network be dot-1, or in this example, 192.168.1.1/24. So put in this address into the freesco as 192.168.1.1, then hit enter. The next question will be what subnet mask. We are using standard class C addressing, /24, so you enter 255.225.255.0 then hit enter.

  9. Next you go through the options and determine what you want on and off. A couple of suggestions. Turn on the extra modules if you have 16 meg or more of memory. Also, do NOT turn on the telnet server, or any of the other services, except the http control interface. Turn this on. It is very useful. I use it to reboot my router, or reconfigure my firewall from work. Very nice interface. I would not use your router as a print server unless you have a pentium box using as a router. But read the documentation on the other services and make your determination as to what you want to turn on. Remember, there is a downside to almost all of the service you turn on inside freesco. I think you are better off not using the ones in FreeSCO, and using services from behind the firewall on other machines.

  10. One other service you might want to turn on for the router is dhcp server. Make the freesco give out the ip addresses to your other machines. This allows you to plug and unplug machines to your network and not have to manually keep up with ip addresses. Just heed their warning. DON'T reserve a ton of ip addresses for dhcp. This eats memory and will slow down your router. If you have 4 computers on your network, then reserve 6 or 8 addresses for the machines. Always give yourself extra for future stuff or friends visiting. Just make sure you have this service turned on secure, or locally, not world-wide. This is true of ALL services except the control panel on port 82.

  11. Exporting services. Now this is probably the easiest thing to configure, and the most important for most people. This is where you set it up to allow you to ssh into your workstation from outside your firewall, set up a mail server, or run a webserver. When it asks you do you want to export services, hit yes. Then hit enter to get into the editor. It is a lot like an old dos editor, very simple and functional. Now they have an example of what the syntax of the lines needs to be. It is very simple line like this: tcp,53,192.168.1.15/53. Now what this shows is this. Open a tcp port on the firewall of port 53, and direct any hits on that port to the machine with the address of 192.168.1.15 and hit port 53 on that machine. Now you can see how you could have directed port 53 on the firewall to port 64000 on the .15 machine. This is called redirection. You must refer back to the class notes from tcp/ip to determine what ports you need opened for each service on your firewall. It all depends on what you are wanting available to the world from within your network. My listing of exported ports is 15 lines long or more. But I am running a dns server (53) mail server (110,25) webserver (80) vncserver(5901, 5800), ftp server, etc. But be careful with what you open up. Each opened port on your firewall is a potential area for someone to hack your system.

  12. The rest of the questions and services all depend on your particular needs. If you run into trouble with your configuration, email the mailing list and myself, scott, or konrad or one of us would be more than willing to help you get it going right.

  13. Now it is all configured and ready to go, exit out and save the configuration. It will right to your floppy the configuration. Now, reboot the machine, even though it will try to finish the boot process. Now when it boots you should see it doing some things, let it run then it will clear the screen and start initializing hardware. This is where you want to watch it closely. You should see it initialize the loopback interface, l0, then it will get to a point of getting an ip address for eth0 if you are running dhcp. Now sometimes this take 15 or 20 seconds. Hit the cntrl-shift-F3 to see the logfile if it freezes for more that 30 or 40 seconds. In the logfile, it will say no DHCPOFFERS on the last line if it was unable to get an ip address. Then you have something wrong with the configuration. Go back and check everything, especially the card settings. Also, if everything looks right, reverse the cards and use the second card as the first interface and vice versa. Sometimes for some unexplainable reason this makes a difference.

  14. Now that you have it all configured, and booted, then you should be able to access your network through the router. Just go to each of your other machines and set the default gateway on all of them to be the inside interface of your router, i.e. 192.168.1.1 in our example.