I just made a router with a old 486 using slackware 10 very recently using only one network card, and the router in my house is a pentium 233 computer that I also use for other things like a testing/learning ftp, http, ssh, database, and backup server.
The first thing you need to do is a very basic slackware 10 install without any of the larger unnecessary packages, now you need to detect your network card(s), this can be a pain in the ass if you are using ISA cards and don't know how to get them working in linux...
After you get your card(s) working, setup your connecting using adsl-setup, make sure its working, now create a new executable file in /etc/rc.d/ called rc.router and add the following code to it:
Code:
ifconfig eth0:1 192.168.0.1
iptables=/sbin/iptables
iptables --flush -t nat
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
iptables --append FORWARD --in-interface eth0:1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
now add the following commands to your /etc/rc.d/rc.local file:
Code:
adsl-start
/etc/rc.d/rc.router
and you are finished, whatever you turn on your router/computer it will share the internet in the 192.168.0.1 gateway!!
Note: This is the way using a single network card connected to the hub, and the modem also connected to the hub, the procedure of doing it with 2 network cards is pretty much the same expect you need to change the eth0:1 to eth1 (or eth0) in the rc.router file.