Help to setup linux box as a mailserver and internet gateway - No bells and whistles.
OK, Hi to everyone out there. I've been wanting to setup and play with linux a long time now. Here at home I have four systems networked. and all are used by the family. everyone uses windows for homework, internet, etc etc. I use my system for Internet, photo editing Digital Video Capture, DVD movie burning etc, + it acts as the gateway/router and mail server for the other three, (It's running WINXP router software with 4 ethernet cards bridged, one is for the cable modem).
What I want to do, is to take some load off that system. I have a 586 sitting here doing nothing, its running at 133 Mhz, has 56 Mb ram, 1.2 gig Hdd, CDRom (Not bios bootable). I figured I would try a bare bones linux O.S. on it (No bells and whistles just the bare essentials) and use it for a gateway/router and mail server for the rest of the network.
The problem is that I've looked at all the distro's and downloaded some CD and floppy boot disk iso's, (Morphix, knoppix, Arklinux etc) and found that not only are they a bit much load on the 586 but also, there is way to much stuff there loaded into ram than I even need!
Would someone be able to walk me through setting up a real small kernal with perhaps a simple GUI (but not essential), which will only run mailserver, routing and share the internet connection to the rest of the network? I was hoping to set up a live cd type arrangement, which auto boots the CDrom drive from either A drive, or preferably C drv, on system startup. That way I will have plenty of space on C drive for swap files and system settings, email storage etc etc.
Can anyone here help, please please please, coz i'm slowly drowning in all the different distros kernels etc etc which dont really suit me, Plus I have the added disadvantage of not really understanding how all these separate componants fit together, and what I do and dont actually need.
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 :)
Thanx for the info. Have downloaded and burnt the ISOs to CD for Slackware. So far so good. Iv'e booted the system after having partitioned my hard disk for swapfiles and things, according to what setup recomended, and now I'm currently trying to mount the partitions before I run pkgtool.
I've kinda figured it out , but not sure what they mean in their sample mounting procedures, for instance the say (quote):
"If your root partition is /dev/hda1, and is using ext2fs, you would type:
mount /dev/hda1 /mnt/usr -t ext2 "
But they dont tell me what the hell is meant by "ext2fs, and ext2" !!!
Are these alternative file systems used by linux when formatting the partitions? (Kinda like NTFS and FAT32 are to windows?) and if so what is the best file system I should use here?
I kinda feel like I'm learning DOS all over again. LOL! :study:
well they are.
1st i'll explayn what is ext2fs and ext2. There is no diference between them. the "fs" stands for file system and the ext2 is the partion type, like FAT16/32 or NTFS. ext2fs is used by tools, like "mkfs.ext2". The linux partion are ext2 the basic one ext3 basic + jurnal and reiserfs journalized file system with encryption. The last one is not recomended because it's eatyng your resoucec everytime it access the hard disk because it's decypting data. I recomand ext3 its the best.
If you encounter problems feel free to cantact me on msn or yahoo.
Glad to be at service :)
Ok. I finally got everything setup. seemed to breeze through the setup as soon as I figured out the filing system/formatting etc.
Just so you can see what I've done:
hda1 = primary partition of approx 110 meg & setup as swapfile.
hda5 = logical partition of approx 180 meg & setup as /root
hda6 = logical partition of approx 25 meg & setup as /boot
hda7 = logical partition of approx 200 meg & setup as /var
hda8 = logical partition of approx 620 meg & setup as /usr
hda9 = logical partition of approx 175 meg & setup as /home
hda6 was also flagged as bootable during cfdisk partitioning as well as being mounted as /boot after formatting the partitions.
Problem is, even thou setup asked me where I wanted to boot from, it wont seem to boot up unless I use the bootup disk it asked me to create at the end of setting up the packages and asking where I wanted it to boot from etc???? If I try to boot from the hard disk, it goes through the normal preboot stuff, then when you expet to see an operating system fire up (Like syslinux or "starting starting windows 98" or whatever it is you have as an OS) it just says:
"PRESS ANY KEY TO REBOOT"
So I rebooted, thinking maybe its some sort of pre first time running procedure or something, but it just got to the same place and said:
"PRESS ANY KEY TO REBOOT"
I can get to root@darkstar if I use the boot floppy. I'm not sure what that is yet, or what I've done wrong to cause it not to boot properly in the first place.
I still don't know any commands and stuff yet to move around the OS and figure out whats going on. I've tried a few commands I found on various posts to change directorys and even tried midnight commander to see whats going on heirachialy speaking, but I don't think i'm at the right place in the os to use them coz they don't seem to do anything except to say that the commands are not known or something along those lines.
:scratch: :confused: :cry:
Use this link for almost any questions
Your problem is a lilo problem. Edit /etc/lilo.conf. to see how its done use man lilo.conf. There is a full example of a standard lilo.conf file. Just use theat example and edit your kernel path. AND ATENTION, after editing lilo.conf run lilo sa the new configuration will be written to the program.
Good luck fordward :)
I might be taking you down a slightly different path, but I've been using clarkconnect home edition www.clarkconnect.com which seems to fit all of your criteria, and is the most painless thing in the world to setup.
I had my webserver, mailserver, webmail, firewall and routing all setup within 45 minutes of the initial install (which only took 8 minutes)
no real GUI gets installed, and all administration is done via SSL from another machine in the network.
I Highly recommend it.
|All times are GMT -5. The time now is 11:24 PM.|