This page is no longer updated! See my new set of tutorials A FREESCO is born for more up-to-date tutorials.
This is a tutorial for setting up FREESCO as a router in an Ethernet network. I'm by no means an expert but this is how I got my machine working. Maybe this can be of some help for somebody else out there. The main purpose was to document the installation process for my self so I could help my old man get going. If you have any comments on this "tutorial", find errors or have tips, don't hesitate to contact me (firstname.lastname@example.org).
We are going to set up a router which connects a network at home, office or wherever to Internet. FREESCO is the software to use for this. It can be run straight off a floppy but I choose to install it on a HD. There exist several versions of FREESCO, but I decided to go for the latest one, 032. These instructions are based on that version.
Update 2004-08-26 There is a new version out, 033. Unfortunately I have not had the time to verify that this tutorial is valid for that version. If you find any errors, please do not hesitate to contact me.
Please read the whole instruction before starting!
What we need is
The machine that acts as router must be bootable under DOS. This means that you got to have DOS installed on it. But who has it nowdays? One easy solution is to use the start diskette from Windows 9x. If you don't have a start diskette, you can go here and download a bootdisk of your choice. I used the one for Win98SE. Download the file, insert the floppy labelled "Dos" into your computer and double-click the newly downloaded file. The file will be extracted and a bootdisk will be created for you.
You also must get the FREESCO files. The best place to get FREESCO is from sourceforge. Select the version you want and save the file on your HD. I strongly recommend going for the latest version, 032. When downloaded, extract the file to a newly created directory. In the directory, there is a file called readme.txt. Read it. Now, read it again just for sure.
Now we must copy the FREESCO-files onto a floppy. Insert the floppy named "FREESCO" and double-click the file called make_fd.bat. A DOS-window will open and instruct you of what to do. When done, the window closes. You now have all the FREESCO-files on the diskette and are ready to install.
Insert the diskette labelled "Dos" into the router and start the machine. Enter BIOS to ensure that drive A: is first in the boot order. When the machine starts you will be asked whether to start the computer with or without CD-ROM support. Select to start without it. After a while you will be at the DOS-prompt. Now format the HD. Use the command
format c: /s
This will format the HD and add system files to the drive to make it bootable. It will ask for a volume label, just hit Enter here. When this is done, remove the diskette from the computer and reboot it to verify that DOS was installed correctly.
Insert the floppy named "FREESCO" into the machine. Ensure it boots from A: and restart it. This time you won't see DOS, instead FREESCO will be started. After a while, a menu is displayed and awaits your input. Here you decide what to do: start the router in set up mode, start in debug mode, install on HD or just jump to the shell. If you don't type anything within 8 seconds, you will be taken to the shell. If this happens, don't worry. Just press Ctrl-Alt-Del to reboot the machine and start over. As we want to install on the HD, type
mv2hd and press Enter. The router is booted and after a while some text is displayed, notifying you that you are to install FREESCO on the HD. Just hit Enter to start the installation.
Now the following is displayed: "Command will install FREESCO on a FAT-16/32 partition of your hard drive" together with some options. This is a good example of how things are configured in FREESCO. For each parameter, some informative text is displayed, telling you the meaning of the parameter. Often there are some alternatives for you to choose among. There might also be a default value selected. The default value is displayed within square brackets, ie [default value]. If you are happy with that value, you don't have to type anything, you can just press Enter. On the other hand, if you want to change it, you must enter the new value and then press Enter.
We want to make a clean install while the default is to abort ([a]). Hence we must type "c" and press Enter. Now the necessary files are copied to the HD. When done, a list of options used for starting FREESCO is displayed:
router.batstarts the router
router.bat setupstarts the router in setup mode
router.bat debugdebugs the router
router.bat shelljust brings you the shell
You don't have to learn them, just keep them in mind. Now FREESCO is installed on your machine, remove the diskette from the computer and press Enter to reboot.
After reboot, you end up at the DOS-prompt again. To start the router you must enter any of the start options. As we are to set up the router, we use the command
router.bat setup. Type it at the prompt and press Enter. The router will boot and ask you to log in. Use the user "root" which also has the password "root".
Now an info screen is displayed, telling you the meaning of the colours. Read the information and press Enter to accept the default. A new screen is displayed. Here is where you decide which type of router you want. It is possible to combine several types, but you have to select one type to start from. In this case, we want a brand new Ethernet router so we type "e" and press Enter.
The configuration process starts and takes you through a number of configuration options. Here I just walk them through very brief:
611 Hostname: Can be anything you want
Note! Dingetje pointed out that this option is critical for @home users that use DHCP to setup the IP of the external interface. Such users MUST use the hostname given by @home, or their connection will not work. This does not apply to users with static IP.
612 Domain name: Can be anything you want
Next follows configuration of the NIC's. If you use PCI NIC's, you don't have to care about these, just type x and press Enter to go on.
Then follows a screen for configuring the networks. You have one network on each NIC, so there should be two networks to configure. Here you can change the IP address, network mask, gateway, etc. By default, configuration for network 0 on eth0 is displayed. This is the NIC going out, ie the one connected with your ISP. My ISP uses DHCP to assign a machine its IP number. Hence, I can leave the default value as it is. What I need to change is parameter 627 to tell FREESCO to contact the DHCP of my ISP when booting in order to obtain an IP number. I change the default value [n] to [y]. You might also need to change parameter 631 Gateway to point to the gateway of your ISP.
When done with network 0, it's time for network 1. To switch to configure that network instead of network 0, just type "1" and press Enter. Here I must update
620: Interface name: Name of the NIC. Should be eth1 621: IP address: IP of my router. I use 192.168.0.1 622: Network mask: 255.255.255.0 623-624 are set automatically and should not be changed 625: DHCP-pool, see below
FREESCO can act as a DHCP-server for all the machines inside the network. This means that you don't have to assign your machines IP numbers yourselves. Here you should enter the range of IP numbers that FREESCO can choose among. I stick with a rather low value, 192.168.0.2 -- 192.1268.0.10. This means that there can be 9 machines on my network. Do NOT include the IP of your FREESCO machine in this range (ie 192.168.0.1)!
Type "x" and press Enter when done.
Now you are asked whether to autodetect modems. I have no modems so I select N. You are also asked if you want to enter advanced configuration of modems. Just press Enter to skip.
The configuration process continues by giving you the opportunity to modify several parameters. Most can be left as default but some should be changed. Below is a summary of all options. The ones I modified are displayed in bold.
41 Enable caching DNS server y/s/n [s]? 411 Number of URL's to cache ? ? 412 Enable DNS requests logging (y/n) [n]? 413 Do you want to add static IP's to your DNS file (y/n) [n]? 431 Enable DHCP server y/n [n]? Modified to Y 432 WINS address (if you have one, otherwise -) ? 433 Default-lease-time (sec) ? 434 Maximum-lease-time (sec) ? 435 Do you want to create/edit static dhcp leases (y/n) ? 441 Enable public HTTP server y/s/n [n]? Modified to s 442 Public HTTP server IP port ? 451 Enable time server and router control via HTTP y/s/n [s]? 452 Control HTTP server IP port ? 453 Host Time server address (- disable syncing time) [www.clock.org]? 454 Time offset to UTC(GMT) [+0000] Modified to +0200 461 Enable Print Server(s) y/s/n [n]? 47 Enable telnet server y/s/n [n]? Modified to S 51 Enable FTP server y/s/n [n]? Modified to S 512 FTP port. ? 513 Maximum Allowed FTP connections ? 514 Allow anonymous FTP connections y/n [n]? 42 Enable Cron deamon (y/n) ? [n]? 50 Do you want to enable the ident server (y/n/s) [n]? 141 Blank screen after N min (0 - never) ? Modified to 0, have no screen connected 142 Stop hdd after N*5 sec (0 - never) ? 15 Swap file size in MB on boot device (0 - disable) ? Modified to 32 which is half my memory. 13 Do you want to enable extra modules/programs (y/n) [n]? Modified to yes to get ile 19 Do you want to install ramdrives (y/n) [n]? 161 System log size (bytes) ? 162 Logins log size (bytes) ? 49 Do you want to enable the DynDNS/DHS/CJB client (y/n) [n]?
Phew! Quit a lot, but now we're almost done. You are asked to change the passwords for the users root, admin and ppp. Do it! Change those passwords now and then you are done. NB! Remember the passwords, especially the root one. If you forget it, you will be locked out from your machine and need to reinstall it.
Press Enter to return to the main configuration screen. Here you should select "s" to save configuration and exit. By now, you should be at [Linux] prompt. You need to reboot the machine in order for all changes to take effect. Type reboot, press enter and watch the system go down.
When the machine starts again, it won't start FREESCO directly. You need to enter one of the start commands that were presented to you earlier. As we want to start the router in normal mode, we type
router.bat. The machine is booted and ends up at the login prompt. Now log in as root (with the new password). The [Linux] prompt is displayed. Now type
and hit Enter. This will check if there is a connection between your router and the FREESCO site. If you get answers like
64 bytes from 184.108.40.206: icmp_seq=0 ttl=38 time=150.9 ms
you are connected to the net. Congratulations! What remain is to configure your clients but that is the easiest part here.
As you might have noticed, when you reboot the router, FREESCO will not start by it self. You have to type any of the start commands to start the router. This might seem inconvenient but fortunately there is an easy solution.
When a DOS system boots, it looks for a file called autoexec.bat. If that file is present, the commands in it are executed. This is exactly what we want. If we rename router.bat to autoexec.bat, FREESCO will start automatically each time the machine is restarted. The file can be renamed by typing
ren router.bat autoexec.bat
But hold on! There is a drawback with this solution. If you ever want to start the router in a different mode than the normal one, you have to hammer the right keys on the keyboard to stop the computer from reading autoexec.bat. A bit more elegant and not very complicated solution is to create a start menu. When the computer is booted, a menu with start options is displayed on the screen. Then you can select which way you want to start FREESCO. You can also set a default option so you don't have type anything at all. This step is absolutely optional, but as it is rather easy, I recommend everybody to follow it.
What we want is a menu that allows us to start FREESCO in any of the four modes. We also want the possibility to start in DOS. By default, we want to start the router in normal mode. Start by inserting the floppy named "Start" into your computer (not the FREESCO box). Open any text editor of your choice, eg Notepad (do NOT use Word!). Type the following:
[menu] MENUITEM = Dos, MS-DOS mode MENUITEM = FREESCO, Start FREESCO, normal mode MENUITEM = Setup, Start FREESCO, setup mode MENUITEM = Debug, Start FREESCO, debug mode MENUITEM = Shell, Start FREESCO, shell mode MENUDEFAULT FREESCO, 5 [Dos] [FREESCO] [Setup] [Debug] [Shell]
The meaning of all this is that we create a menu with options for starting in DOS, FREESCO in normal mode, in setup mode, debug mode or just the shell. If we don't touch the keyboard within five seconds, FREESCO will start in normal mode. Save the file on your floppy in a file called config.sys.
Now clear the editor and type the following:
@echo off GOTO %CONFIG% :Dos GOTO :END :FREESCO router.bat GOTO :END :Setup router.bat setup GOTO :END :Debug router.bat debug GOTO :END :Shell router.bat shell GOTO :END :END
The purpose of all this is to start the router or DOS depending on your choice in the start menu. If you select the DOS option in the menu, you will end up in DOS, if you select FREESCO, then FREESCO will start in normal mode, if you select Debug, FREESCO will start in debug mode, etc. Now save the file to the floppy under the name autoexec.bat.
Now it is time to copy the files to your FREESCO box. Ensure the machine is started and you are at the prompt (c:\>). Insert the floppy with the files you just created in the machine and type
copy a:\config.sys c:\ copy a:\autoexec.bat c:\
Now the files are copied to your FREESCO. Remove the floppy and restart the machine. Now you should see a menu with the options you have created. If you don't do anything, FREESCO will start in normal mode after five seconds. Tada! We're done!
By now your router should be up and running. Go to a security site, eg http://www.grc.com and verify that is works, ie that your ports are closed.
If you have any problems, search in the FREESCO forums at http://forums.freesco.org. This is a gold mine with answers to the most questions. Please do NOT contact me with your problems; I probably can't answer them anyway.
Hope you'll enjoy your new FREESCO!
Last modified: Wed Apr 19 22:34:08 +0200 2006