LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-15-2004, 11:23 PM   #1
mantis3dfx
LQ Newbie
 
Registered: Jan 2004
Location: Melbourne, Australia.
Distribution: Not specified yet. Still perusing them all
Posts: 3

Rep: Reputation: 0
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.

From Mantis3dfx

 
Old 01-16-2004, 02:13 AM   #2
sqn
Member
 
Registered: Apr 2002
Distribution: Ubuntu, Arch, freeBSD, Slackware
Posts: 210

Rep: Reputation: 30
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
use:

# 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
use:

# 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
use:

# /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:

# adduser

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.
use:

# 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/
use:

# touch /etc/rc.d/rc.firewall

now use a text editor (i use pico) and put the folowing lines in:
use:

# pico /etc/rc.d/rc.firewall
now put this in:

#!/bin/bash
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -F
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
/etc/rc.d/rc.firewall.

Now execute the script
# /etc/rc.d/rc.firewall

and you'll have a router. All you have to do is configure your workstations t use the new gateway
hope this helps
 
Old 01-16-2004, 11:09 PM   #3
mantis3dfx
LQ Newbie
 
Registered: Jan 2004
Location: Melbourne, Australia.
Distribution: Not specified yet. Still perusing them all
Posts: 3

Original Poster
Rep: Reputation: 0
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!

Last edited by mantis3dfx; 01-16-2004 at 11:21 PM.
 
Old 01-17-2004, 05:32 AM   #4
sqn
Member
 
Registered: Apr 2002
Distribution: Ubuntu, Arch, freeBSD, Slackware
Posts: 210

Rep: Reputation: 30
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
 
Old 01-18-2004, 12:23 AM   #5
mantis3dfx
LQ Newbie
 
Registered: Jan 2004
Location: Melbourne, Australia.
Distribution: Not specified yet. Still perusing them all
Posts: 3

Original Poster
Rep: Reputation: 0
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.

Any clues???
 
Old 01-20-2004, 03:02 AM   #6
sqn
Member
 
Registered: Apr 2002
Distribution: Ubuntu, Arch, freeBSD, Slackware
Posts: 210

Rep: Reputation: 30
http://www.tldp.org/docs.html
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
 
Old 02-20-2004, 05:40 PM   #7
marsonist
Member
 
Registered: Sep 2002
Location: Stuttgart, Germany
Distribution: SuSE 9.1 Pro
Posts: 171

Rep: Reputation: 30
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.


Steve
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
setup Suse 9.2 box as my gateway anybody1234 Linux - Networking 6 10-27-2005 05:23 AM
Hi I am trying to setup a mailserver with internet connection! HOWTO? ankursaxena Linux - Software 8 03-04-2005 07:42 AM
Linux box as Gateway to internet for Windows Network bickyz Linux - Networking 11 11-29-2004 07:06 PM
Connecting Linux box to Internet through Windowx XP box over LAN pcd007 Linux - Networking 1 03-14-2004 10:02 AM
.profile bells and whistles liguorir Linux - Software 1 11-20-2003 03:06 PM


All times are GMT -5. The time now is 03:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration