Well almost all distros will work on your system. I use slackware linux, its a litter harder then SuSE or RedHat, but it's the best. If you want a router and a mail server forget the GUI. I have a running server on old CyRIX at 133MHZ with a 1,2GB hdd with a lots of services running.
The problem will be choosing your pakages that will be installed. 1st of all drop everithing that is relted to X (linux GUI), that is xfree86, KDE, GNOME, libraries needed for gnome & KDE, games, and x aplications. Now drop the TCL and emacs. If you want just mail and "internet routing" you can drop the C pakeges as well.
Now after installing your system you'll need to make some chages in some files to make it more secure (these will be discued in another post, after you cuceed the setup). Now the sendmail deamon is running and it can send e-mails, but canot receve them. Create in /etc/mail/ the sendmail.cw file and put in it your domain name
# touch /etc/mail/sendmail.cw
# echo "yourdomain.com" >> /etc/mail/sendmail.cw
now create in the same direvtory (/etc/mail/) a file called relay-domains and put in it your internal network ips
# touch /etc/mail/relay-domains
# echo "127.0.01" > /etc/mai/etc/mail/relay-domains
# echo "192.168.0. >> /etc/mail/relay-domains
now restart your sendmail deamon
# /etc/rc.d/rc.sendmail restart
now youll have a running mail server. All you have to do now is create users for mail acounts.
use the folowing command:
and follow the instruction listed below. ATTENTION!!! when the adduser will ask for a shell use "/bin/false" and chose no (n) in the screen that apears next.
ok now lets setup the network and fireup on the internet
I asume that all your networks card are identical, so i'll be short.
# ifconfig eth1 <ip-address> netmask 255.255.255.0
for the second network card, the 1st was configurated during the setup
change eth1 to eth2 etc and add the rest of the network cards.
Attention! during the setup use the ip and gareway and DNS you got from your ISP.
Now add the ifconfig line to /etc/rc./rc.local so that the network will be started each time you reboot your machine.
Now careate a file called rc.firewall and put it in /etc/rc.d/
# touch /etc/rc.d/rc.firewall
now use a text editor (i use pico) and put the folowing lines in:
# pico /etc/rc.d/rc.firewall
now put this in:
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -F
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
(now press ctrl+x save and exit. Now make the script executable use
# chmod +x rc.firewall
now in the same /etc/rc.d/rc.local add this line too
Now execute the script
and you'll have a router. All you have to do is configure your workstations t use the new gateway
hope this helps