Wednesday, March 12, 2008

Red Hat Installations

NOTE:
This problem, which has never gone away, is a direct result of Intel refusing to release any information about their proprietary interrupt routing hardware on the 440GX motherboard. Please don't come to me asking when Red Hat or Linux is going to solve this problem because we can't, this is an Intel created problem that only Intel can solve!These boot disks:http://people.redhat.com/dledford/440gx/boot.imghttp://people.redhat.com/dledford/440gx/bootnet.imghttp://people.redhat.com/dledford/440gx/pcmcia.imgallow people to install Red Hat 7.1 on 440gx based motherboards. Instructions for using them to install Red Hat 7.1 are included below. Instructions on how to install Red Hat 7.2 and 7.3 on the same system are slightly different and included after the 7.1 instructions.
Red Hat 7.1 installation instructions
Using the appropriate boot image diskette for your system, when you boot the kernel, use the apic command line option, aka:boot: linux apicThis will force the UP-IOAPIC code on in the boot kernel and allow the interrupt routing to get properly fixed up. This allows you to install to these machines. However, there is a second issue.
If your machine only has 1 processor installed, then the SMP kernel will not automatically get installed. You will need to enable individual package selection, then go into the kernel packages and select the SMP kernel. You will then need to make sure that when you reboot the machine, you tell it to boot the SMP kernel. You can make the SMP kernel the default by changing the line:default = linuxtodefault = linux-smpin the /etc/lilo.conf file and then running the lilo command as root to re-initialize the master boot record on your hard disks.
Red Hat 7.2 installation instructions
Use the normal install disks, no special boot disks are needed for Red Hat 7.2. However, you will need to pass the apic option to the kernel on the boot disks, so for example when booting up the install disk you would type something like:boot: linux apicThis does the same thing as the special 7.1 install disks in that it enables IO-APIC support in the install kernel.
Follow the step 2 instructions for 7.1.
Red Hat 7.3 installation instructions
Use the normal install disks, no special boot disks are needed for Red Hat 7.3. However, you will need to pass the apic option to the kernel on the boot disks, so for example when booting up the install disk you would type something like:boot: linux apicThis does the same thing as the special 7.1 install disks in that it enables IO-APIC support in the install kernel.
Follow the step 2 instructions for 7.1. However, there is a special note that grub is now the default boot loader of choice, so configuring grub is slightly different than configuring lilo. Please read the regular install documents that come with Red Hat 7.3 to learn how to configure grub.
Red Hat 8.0 installation instructions
Use the normal install disks, no special boot disks are needed for Red Hat 8.0. However, you will need to pass the apic option to the kernel on the boot disks, so for example when booting up the install disk you would type something like:boot: linux apicThis does the same thing as the special 7.1 install disks in that it enables IO-APIC support in the install kernel.
WARNING! For Red Hat 8.0 the instructions change, so please don't blindly plow ahead like you would for 7.3! In order to get your system to boot up after installation, you either must have 2 real CPUs in the machine or you *MUST* install and use the debug kernel. THE SMP KERNEL NO LONGER WORKS ON UNIPROCESSOR 440GX MACHINES!! After you have installed the debug kernel and modified grub or lilo to boot the debug kernel as your default kernel, then your uniprocessor 440gx machine will work.

Installation of your Linux Server

Installation of your Linux Server
Table of Contents
3.1. Know your Hardware!
3.2. Creating the Boot Disk and Booting
3.3. Installation Class and Method (Install Type)
3.4. Disk Setup- Disk Druid
3.5. Disk Druid
3.6. An example
3.7. Post-Partitioning
3.8. Components to Install- Package Group Selection
3.9. Select Individual Package - Part 'A'
3.10. Select Individual Package -Part 'B'
3.11. How to use RPM Commands
3.12. Starting and stopping daemon services

3.1. Know your Hardware!
Understanding the hardware of your computer is essential for a successful installation of Red Hat Linux. Therefore, you should take a moment now and familiarize yourself with your computer hardware. Be prepared to answer the following questions:
How many hard drives do you have?
What size is each hard drive? e.g. 3.2GB.
If you have more than one hard drive, which is the primary one?
What kind of hard drive do you have? e.g. IDE, SCSI.
How much RAM do you have e.g. 256MB RAM.
Do you have a SCSI adapter? If so, who is the manufacturer and what model is it?
Do you have a RAID system? If so, who is the manufacturer and what model is it?
What type of mouse do you have e.g. PS/2, Microsoft, Logitech.
How many buttons does your mouse have? 2/3 buttons.
If you have a serial mouse, what COM port is it connected to? e.g. COM1.
What is the make and model of your video card? How much video RAM do you have? e.g. 4MB.
What kind of monitor do you have? Make and Model.
Will you be connected to a network? If so, what will be the following:
Your IP address?
Your netmask?
Your gateway address?
Your domain name server's IP address?
Your domain name?
Your hostname?
Your types of network(s) card(s)? Make and Model.
Your number of card(s)? Make and Model.

3.2. Creating the Boot Disk and Booting
The first thing to do is to create an installation diskette also known as a boot disk. If you have purchased the official Red Hat Linux CD-ROM, you will find this floppy disk named Boot Diskette in the Red Hat Linux box and you don't need to create it. From time to time, you may find that the installation will fail with the standard diskette image that comes with the official Red Hat Linux CD-ROM. If this happens, a revised diskette is required in order for the installation to work properly. In these cases, special images are available via the Red Hat Linux Errata web page to solve the problem http://www.faqs.org/docs/securing/appendixa.html#prtinxfp4. Since this, is a relatively rare occurrence, you will save time if you try to use the standard diskette images first, and then review the Errata only if you experience any problem completing the installation.
Step 1. Before you make the boot disk, insert the Official Red Hat Linux CD-ROM Part 1 in your computer that runs the Windows operating system. When the program asks for the filename, enter boot.img for the boot disk. To make the floppies under MS-DOS, you need to use these commands assuming your CD-ROM is drive D: and contain the Official Red Hat Linux CD-ROM.
Open the Command Prompt under Windows: Start Programs Command Prompt
C:\> d:
D:\> cd \dosutils
D:\dosutils> rawrite
Enter disk image source file name: ..\images\boot.img
Enter target diskette drive: a:
Please insert a formatted diskette into drive A: and press --ENTER-- :
D:\dosutils>

The rawrite.exe program asks for the filename of the disk image: Enter boot.img and insert a floppy into drive A. It will then ask for a disk to write to: Enter a:, and when complete, label the disk; for example, Red Hat boot disk.
Step 2. Since we'd start the installation directly off the CD-ROM, boot with the boot disk. Insert the boot diskette you create into the drive A: on the computer where you want to install Linux and reboot the computer. At the boot:, press Enter to continue booting and follow the three simple steps below:
Choose your language
You can choose your prefferd language for the Linux OS from a list. For example, English, Danish etc
Choose your keyboard type
You can choose your Keyboard type. For example US pc104, norwegian etc
Select your mouse type
You can choose your mouse type. For example Logitech two button, Microsoft three button mouse etc

3.3. Installation Class and Method (Install Type)
Red Hat Linux 6.1 and 6.2 include four different classes, or type of installation. They are:
GNOME Workstation
KDE Workstation
Server
Custom
The first three classes GNOME Workstation, KDE Workstation, and Server give you the option of simplifying the installation process with a significant loss of configuration flexibility that we don't want to lose. For this reason we highly recommend Custom installation, as this allows you to choose what services are added and how the system is partitioned.The idea is to load the minimum number of packages, while maintaining maximum efficiency. The less software that resides on the box, the fewer potential security exploits or holes may appear.Select Custom and click Next

3.4. Disk Setup- Disk Druid
We assume that you are installing your new Linux server to a new hard drive, with no other existing file system or operating system previously installed. A good partition strategy is to create a separate partition for each major file system. This enhances security and prevents accidental denial of service or exploit of SUID programs.
Creating multiple partitions offers you the following advantages:
Protection against denial of service attack.
Protection against SUID programs.
Faster booting.
Easy backup and upgrade management.
Ability for better control of mounted file system.
Limit each file system's ability to grow.
If previous file system or operating system exist on the hard drive and computer where you want to install your Linux system, we highly recommend, that you make a backup of your current system before proceeding with the disk partitioning.
Step 1. For performance, stability and security reasons you must create something like the following partitions listed below on your computer. We suppose for this partition configuration the fact that you have a SCSI hard drive of 3.2 GB. Of course you will need to adjust partition sizes according to your own needs and disk size. Partitions that must be created on your system:
/boot 5MB
/usr 512MB
/home 1146MB
/chroot 256MB
/cache 256MB
/var 256MB
128MB
/tmp 256MB
/ 256MB


All Kernel images are kept here.

Must be large, since all Linux binaries programs are installed here.

Proportional to the number of users you intend to host i.e. 10MB per users multiplied by the number of users 114 = 1140MB.

If you want to install programs in chroot jail environment i.e. DNS.

This is the cache partition of a proxy server i.e. Squid.

Contains files that change when the system run normally i.e. Log files.

Our swap partition. The virtual memory of the Linux operating system.

Our temporary files partition.

Our root partition.
We have made two more special partitions:
/chroot
The /chroot partition can be used for DNS server chrooted, Apache server chrooted and other chrooted future programs.
/cache
The /cache partition can be used for a Squid Proxy server. If you are not intending to install Squid Proxy server you don't need to create the /cache partition.
Keeping /tmp and /home on separate partitions is pretty much mandatory if users have shell access to the server- protection against SUID programs; splitting these off into separate partitions also prevent users from filling up any critical file system -denial of service attack. The same applies to /var, and /usr on separate partitions is also a very good idea. By isolating the /var partition, you protect your root partition from overfilling -denial of service attack.
In our partition configuration we'll reserve 256 MB of disk space for chrooted programs like Apache, DNS and other software. This is necessary because Apache DocumentRoot files and other binaries, programs related to Apache will be installed in this partition if you decide to run Apache web server in a chrooted jail.
Take note that the size of the Apache chrooted directory on the chrooted partition is proportional to the size of your DocumentRoot files. If you're not intending to install and use Apache on your server, you can reduce the size of this partition to something like 10 MB for DNS server that you always need in a chrooted jail environment for security reasons.
Minimum size of partitions: For information purposes only, this is the minimum size in megabytes, which a Linux installation must have to function properly. The sizes of partitions listed below are really small. This configuration can fit into a very old hard disk of 512MB in size that you might find in old x486 computers. We show you this partition just to get an idea of the minimum requirements.
/ 35MB
/boot 5MB
/chroot 10MB
/home 100MB
/tmp 30MB
/usr 232MB
/var 25MB
3.5. Disk Druid
Disk Druid Partitions is a program that partitions your hard drive for you. Choose Add to add a new partition, Edit to edit a partition, Delete to delete a partition and Reset to reset the partitions to the original state. When you add a new partition, a new window appears on your screen and gives you parameters to choose. Different parameters are:
Mount Point:
for where you want to mount your new partition in the filesystem.
Size (Megs):
for the size of your new partition in megabytes.
Partition Type:
Linux native for Linux filesystem and Swap for Linux Swap Partition.

: If you have a SCSI disk the device name will be /dev/sda and if you have an IDE disk it will be /dev/hda. If you're looking for high performance and stability, a SCSI disk is highly recommended. Linux refers to disk partitions using a combination of letters and numbers. It uses a naming scheme that is more flexible and conveys more information than the approach used by other operating systems.
Here is a summary:
Disk naming convention
First Two Letters
The first two letters of the partition name indicate the type of device on which the partition resides. You'll normally see either hd (for IDE disks), or sd (for SCSI disks).
The Next Letter
This letter indicates which device the partition is on. For example: /dev/hda (the first IDE hard disk) and /dev/hdb (the second IDE disk). Keep this information in mind, it will make things easier to understand when you're setting up the partitions Linux requires.
Swap partitions are used to support virtual memory. If your computer has 16 MB of RAM or less, you must create a swap partition. Even if you have more memory, a swap partition is still recommended. The minimum size of your swap partition should be equal to your computer's RAM or 16 MB (whichever is larger). The largest useable swap partition is roughly 1 GB, since 2.2 kernel, 1 GB swap file are supported so making a swap partition larger than that will result in wasted space. Note, however, that you can create and use more than one swap partition although this is usually only necessary for very large server installations.
Try to put your swap partitions near the beginning of your drive. The beginning of the drive is physically located on the outer portion of the cylinder, so the read/write head can cover much more ground per revolution.

representation of linux partition

3.6. An example
To make the partitions listed below on your system; this is the partition we'll need for our server installation example; the command will be under Disk Druid:
Add
Mount Point: /boot our /boot directory.
Size (Megs): 5
Partition Type: Linux Native
Ok
Add
Mount Point: /usr our /usr directory.
Size (Megs): 512
Partition Type: Linux Native
Ok
Add
Mount Point: /home our /home directory.
Size (Megs): 1146
Partition Type: Linux Native
Ok
Add
Mount Point: /chroot our /chroot directory.
Size (Megs): 256
Partition Type: Linux Native
Ok
Add
Mount Point: /cache our /cache directory.
Size (Megs): 256
Partition Type: Linux Native
Ok
Add
Mount Point: /var our /var directory.
Size (Megs): 256
Partition Type: Linux Native
Ok
Add
Mount Point: our /Swap partition leave the Mount Point Blank.
Size (Megs): 128
Partition Type: Linux Swap
Ok
Add
Mount Point: /tmp our /tmp directory.
Size (Megs): 256
Partition Type: Linux Native
Ok
Add
Mount Point: / our / directory.
Size (Megs): 256
Partition Type: Linux Native
Ok
After the partitions of your hard disk has been completed, you must see something like the following information on your screen. Our mount points will look like this:

Table 3-1. Sample representaion of partitions
Mount Point
Device
Requested
Actual
Type
/boot
sda1
5M
5M
Linux Native
/usr
sda5
512M
1146M
Linux Native
/home
sda6
256M
256M
Linux Native
/chroot
sda7
256M
256M
Linux Native
/cache
sda8
256M
256M
Linux Native
/var
sda9
256M
256M
Linux Native

sda10
128M
128M
Linux Swap
/tmp
sda11
256M
256M
Linux Native
/
sda12
256M
256M
Linux Native

Drive
Geom [C/H/S]
Total (M)
Free (M)
Used (M)
Used (%)
sda
[3079/64/32]
3079M
1M
3078M
99%
: We are using a SCSI hard disk hence the first two letters of the device are sd.
3.7. Post-Partitioning
Now that you are partitioning and choosing the mount point of your directories, select Next to continue. After your partitions are created, the installation program will ask you to choose partitions to format. Choose the partitions you want to initialize, check the (Check for bad blocks during format) box, and press Next. This formats the partitions and makes them active so Linux can use them.
On the next screen you will see the LILO Configuration where you have the choice to install LILO boot record on:
Master Boot Record (MBR)
Or
First Sector of Boot Partition
Usually if Linux is the only OS on your machine you should choose the Master Boot Record (MBR) option. After that, you need to configure your Network and Clock. After you finish configuring the clock, you need to give your system a root password and authentication configuration. For Authentication Configuration don't forget to select:
Enable MD5 passwords
Enable Shadow passwords
Enable NIS doesn't need to be selected since we are not configuring NIS services on this server.

3.8. Components to Install- Package Group Selection
After your partitions have been configured and selected for formatting, you are ready to select packages for installation. By default, Linux is a powerful operating system that executes many useful services. However, many of these services are unneeded and pose potential security risks.
Ideally, each network service should be on a dedicated, single-purpose host. Many Linux operating systems are configured by default to provide a wider set of services and applications than are required to provide a particular network service, so you may need to configure the server to eliminate unneeded services. Offering only essential services on a particular host can enhance your network security in several ways:
Other services cannot be used to attack the host and impair or remove desired network services.
Different individuals may administer different services. By isolating services so each host and service has a single administrator you will minimize the possibility of conflicts between administrators.
The host can be configured to better suit the requirements of the particular service. Different services might require different hardware and software configurations, which could lead to needless vulnerabilities or service restrictions. By reducing services, the number of logs and log entries is reduced so detecting unexpected behavior becomes easier.
A proper installation of your Linux server is the first step to a stable, secure system. You first have to choose which system components you want to install. Choose the components, and then you can go through and select or deselect each individual package of each component by selecting Select individual packages option on your Red Hat setup screen. Since we are configuring a Linux Server, we don't need to install a graphical interface XFree86 on our system, a graphical interface on a server means less processes, less CPU availability, less memory, security risks, and so on. Graphical interfaces are usually used on workstations only.
Select the following packages for installation:
Networked Workstation
Network Management Workstation
Utilities
After selecting the components you wish to install, you may select or deselect packages.
: Select the Select individual packages options before continuing to have the option to select and deselect packages.


3.9. Select Individual Package - Part 'A'
The installation program presents a list of the package groups available. Select a group to examine. The components listed below must be deselected from the Menu Group for security; optimization and other reasons described below:
Applications/File:.
git
The GIT package provides an extensible file system browser, an ASCII/hexadecimal file viewer, a process viewer/killer and other related utilities and shell scripts. Unnecessary.
Applications/Internet:.
finger
The finger package is a client utility, which allows users to see information about system users. Security risks.
ftp
The ftp package provides the standard UNIX command-line FTP client. Security risks.
fwhois
The fwhois client program allows for querying whois databases. Security risks.
ncftp
The Ncftp package is an improved FTP client. [Security risks, Unnecessary.
rsh
The rsh package provides client programs, which allows users to run commands on remote machines, login to other machines and copy files between machines (rsh, rlogin and rcp). Security risks.
rsync
rsync is very powerfull mirroring program, which brings very quickly remote and host files into sync. Unnecessary
talk
The ntalk package provides client and daemon programs for the Internet talk protocol, which allows you to chat with other users on different UNIX systems. Security risks.
telnet
Telnet is a popular protocol for logging into remote systems over the network but it is insecure (transfer password in plain text). Security risks.
Applications/Publishing:.
ghostscript
The GhostScript package is a set of software that provides a PostScript interpreter, and an interpreter for Portable Document Format PDF files. Unnecessary
ghostscript-fonts
The GhostScript interpreter can use the Ghostscript-fonts package during text rendering. Unnecessary.
groff-perl
The groff-perl package is a set of commands and print filter used in printer environment. Unnecessary, no printer installed on the server.
mpage
The mpage package utility takes plain text files or PostScript documents as input, reduces the size of the text, and prints the files on a PostScript printer with several pages on each sheet of paper. Unnecessary, no printer installed on the server
pnm2ppa
The pnm2ppa package is a color driver for printing to HP PPA printers. Unnecessary, no printer installed on the server.
rhs-printfilters
The rhs-printfilters package contains a set of print filters, which is primarily meant to be use with the Red Hat printtool. Unnecessary, no printer installed on the server
Applications/System:.
arpwatch
The arpwatch package contains utilities to monitor Ethernet or FDDI network traffic and build databases of Ethernet/IP address pairs. Unnecessary
bind-utils
The bind-utils package contains a collection of utilities to find out information about Internet hosts. We will compile it later on this book.
knfsd-clients
The knfsd-clients package contains the showmount program that queries the mount daemon on a remote host for information about the NFS server on the remote host. Security risks, and NFS services are not installed on this server.
procinfo
The procinfo package acquires information about your system from the kernel as it is running. Unnecessary, other methods exist.
rdate
The rdate package utility can retrieve the date and time from another machine on your network. Security risks.
rdist
The rdist package is a program that maintains identical copies of files on multiple hosts. Security risks.
screen
This screen package is a useful utility for users who telnet into a machine or are connected via a dumb terminal, but want to use more than just one login. Unnecessary
ucd-snmp-utils
The ucd-snmp-utils package contains various utilities for use with the ucd-snmp network management project. Unnecessary, Security risks
Documentation:.
indexhtml
The indexhtml package contains the HTML page and graphics for a welcome page shown by your Web browser into X Window Systems. Unnecessary,we don't use graphical interface.
3.10. Select Individual Package -Part 'B'
System Environment/Base:.
chkfontpath
The chkfontpath package is a simple program for adding, removing and listing the directories contained in the X font server's path. Unnecessary, we don't use graphical interface
yp-tools
The Network Information Service NIS is a system, which provides and centralizes network information; login names, passwords, home directories, and group information, to all of the machines on a network. Security risks, we don't use it on our server
System Environment/Daemons: .
XFree86-xfs
The XFree86-xfs package is a font server for XFree86 that can also serve fonts to other X servers remotely. Unnecessary, we don't use graphical interface
finger-server
The finger-server package contain the finger daemon that runs from the /etc/inetd.conf, file and allows users to see information about system users on the server. Security risks.
lpr
The lpr package provides the basic system utility for managing printing services. Unnecessary and no printer installed on the server
nfs-utils
The nfs-utils package provides the tools and daemon for the kernel NFS server. This package must be installed if you want to provide NFS services on your server. Security risks, and NFS services are not installed on this server.
pidentd
The pidentd package contains the identd, which looks up specific TCP/IP connections and returns either the user name or other information about the process that owns the connection. Unnecessary, very few things on the net require the sender to be running identd, because many machines don't have it and because many people turn it off.
portmap
The portmapper package manages RPC connections, which are used by protocols like NFS and NIS. Unnecessary, Security risks, and NIS/NFS services are not installed on this server.
rsh-server
The rsh-server package provides the servers needed for (rsh, rlogin, rcp) which allow users to run remote access commands on remote machines. Security risks
rusers
The routed package routing daemon maintains current routing tables by handling incoming RIP traffic and broadcasts outgoing RIP traffic about network traffic routes. Unnecessary, Security risks, and limited.
rusers-server
The rusers package program allows users to find out who is logged into various machines on the local network. Security risks.
rwall-server
The rwall-server package contains the daemon which allows receiving remote messages from users in remote hosts. Security risks
rwho
The rwho package shows who is logged in for all machines on the local network running the rwho daemon. Security risks.
talk-server
The talk-server package provides the daemon program, which allows you to chat via terminal with other users on remote UNIX systems. Security risks.
telnet-server
The telnet-server package provides the daemon, which allows telnet remote logins protocol to your server. Security risks, replace by SSH
tftp
The tftp package or Trivial File Transfer Protocol TFTP allows users to transfer files to and from a remote machine. It is normally used only for booting diskless workstations. Security risks, Unnecessary.
tftp-server
The tftp-server package provides the server for (TFTP), which allows users to transfer files to and from a remote machine. Security risks, Unnecessary.
ucd-snmp
The ucd-snmp package or SNMP -Simple Network Management Protocol is a protocol used for network management. Unnecessary, Security risks
ypbind
The ypbind package is a daemon which binds NIS -Network Information Service server client to NIS server. Security risks, we don't use it on our server.
ypserv
The ypserv package is the NIS -Network Information Service server, which provides network information (NIS) to all of the machines on a network. Security risks, we don't use it on our server
System Environment/Libraries:.
XFree86-libs
The XFree86-libs package contains the shared libraries that most X programs need to run properly. Unnecessary, we dont use graphical interface.
libpng
The libpng package contains a library of functions for creating and manipulating GIF image format files. GIF is a bit-mapped graphics format similar to the GIF format. Unnecessary.
User Interface/X:.
XFree86-75dpi-fonts
The XFree86-75dpi-fonts package contains the 75 dpi fonts (the standard fonts) used on most X Window Systems. Unnecessary, we don't use graphical interface.
urw-fonts
The urw-fonts package contain free versions of the 35 standard Type 1 PostScript fonts. Unnecessary, we don't use graphical interface.


3.11. How to use RPM Commands
This section contains an overview of principal modes using with RPM for installing, uninstalling, upgrading, querying, listing, and checking RPM packages on your Linux system. You must be familiar with these RPM commands now because we'll use them often in the continuation of this book. To install a RPM package, use the command:
[root@deep] /#rpm -ivh foo-1.0-2.i386.rpm
Take a note that RPM packages have a file of names like foo-1.0-2.i386.rpm, which include the package name (foo), version (1.0), release (2), and architecture (i386).
To uninstall a RPM package, use the command:
[root@deep] /#rpm -e foo
Notice that we used the package name foo, not the name of the original package file foo-1.0-2.i386.rpm.
To upgrade a RPM package, use the command:
[root@deep] /#rpm -Uvh foo-1.0-2.i386.rpm
With this command, RPM automatically uninstall the old version of foo package and install the new one. Always use rpm -Uvh to install packages, since it works fine even when there are no previous versions of the package installed.
To query a RPM package, use the command:
[root@deep] /#rpm -q foo
This command will print the package name, version, and release number of installed package foo. Use this command to verify that a package is or is not installed on your system.
To display package information, use the command:
[root@deep] /#rpm -qi foo
This command display package information; includes name, version, and description of the installed program. Use this command to get information about the installed package.
To list files in package, use the command:
[root@deep] /#rpm -qlfoo
This command will list all files in a installed RPM package. It works only when the package is already installed on your system.
To check a RPM signature package, use the command:
[root@deep] /#rpm --checksig foo
This command checks the PGP signature of specified package to ensure its integrity and origin. Always use this command first before installing new RPM package on your system. Also, GnuPG or Pgp software must be already installed on your system before you can use this command.


3.12. Starting and stopping daemon services
The init program of Linux -also known as process control initialization, is in charge of starting all the normal and authorized processes that need to run at boot time on your system. These may include the APACHE daemons, NETWORK daemons, and anything else that must be running when your machine boots. Each of these processes has a script under /etc/rc.d/init.d/ directory written to accept an argument, which can be start, stop and restart. You can execute those scripts by hand in fact with a command:

Example 3-1. Starting and Stopping various Daemon's
To start the httpd Web Server manually under Linux.
[root@deep] /# /etc/rc.d/init.d/httpd start

Starting httpd: [OK]
To stop the httpd Web Server manually under Linux.
[root@deep] /# /etc/rc.d/init.d/httpd stop

Shutting down http: [OK]
To restart the httpd Web Server manually under Linux.
[root@deep] /# /etc/rc.d/init.d/httpd restart

Shutting down http: [OK] Starting httpd: [OK]
Check inside your /etc/rc.d/init.d/ directory for services available and use command start stop restart to work around.

Friday, February 8, 2008

Cisco Router

Configuring your Cisco Router
If you have just turned on the router, it will be completely unconfigured. If it is already configured, you may want to view its current configuration. Even if it has not been previously configured, you should familiarize yourself with the show commands before beginning to configure the router. Enter privileged mode by issuing the command enable, then issue several show commands to see what they display. Remember, the command show ? will display all the showcommands aavailable in the current mode. Definately try out the following commands:Router#show interfacesRouter#show ip protocolsRouter#show ip routeRouter#show ip arp
When you enter privileged mode by using the command enable, you are in the top-level mode of privileged mode, also known in this document as "parent mode." It is in this top-level or parent mode that you can display most of the information about the router. As you now know, you do this with the show commands. Here you can learn the configuration of interfaces and whether they are up or down. You can display what IP protocols are in use, such as dynamic routing protocols. You can view the route and ARP tables, and these are just a few of the more important options.
As you configure the router, you will enter various sub-modes to set options, then return to the parent mode to display the results of your commands. You also return to the parent mode to enter other sub-modes. To return to the parent mode, you hit ctrl-z. This puts any commands you have just issued into affect, and returns you to parent mode.
3.1 Global configuration (config)
To configure any feature of the router, you must enter configuration mode. This is the first sub-mode of the parent mode. In the parent mode, you issue the command config.Router#configRouter(config)#
As demonstrated above, the prompt changes to indicate the mode that you are now in.
In connfiguration mode you can set options that apply system-wide, also refered to as "global configurations." For instance, it is a good idea to name your router so that you can easily identify it. You do this in configuration mode with the hostname command.Router(config)#hostname
ExampleNameExampleName(config)#
As demonstrated above, when you set the name of the host with the hostname command, the prompt immediately changes by replacing Router with ExampleName. (Note: It is a good idea to name your routers with an organized naming scheme.)
Another useful command issued from config mode is the command to designate the DNS server to be used by the router:ExampleName(config)#ip name-server aa.bb.cc.ddExampleName(config)#ctrl-ZExampleName#
This is also where you set the password for privileged mode.ExampleName(config)#enable secret examplepasswordExampleName(config)#ctrl-ZExampleName#
Until you hit ctrl-Z (or type exit until you reach parent mode) your command has not been put into affect. You can enter config mode, issue several different commands, then hit ctrl-Z to activate them all. Each time you hit ctrl-Z you return to parent mode and the prompt:ExampleName#
Here you use show commands to verify the results of the commands you issued in config mode. To verify the results of the ip name-server command, issue the command show host.
3.2 Configuring Cisco router interfaces
Cisco interface naming is straightforward. Individual interfaces are referred to by this convention:media type slot#/port#
"Media type" refers to the type of media that the port is an interface for, such as Ethernet, Token Ring, FDDI, serial, etc. Slot numbers are only applicable for routers that provide slots into which you can install modules. These modules contain several ports for a given media. The 7200 series is an example. These modules are even hot-swapable. You can remove a module from a slot and replace it with a different module, without interrupting service provided by the other modules installed in the router. These slots are numbered on the router.
Port number refers to the port in reference to the other ports in that module. Numbering is left-to-right, and all numbering starts at 0, not at one.
For example, a Cisco 7206 is a 7200 series router with six slots. To refer to an interface that is the third port of an Ethernet module installed in the sixth slot, it would be interface ethernet 6/2. Therefor, to display the configuration of that interface you use the command:ExampleName#show interface ethernet 6/2
If your router does not have slots, like a 1600, then the interface name consists only of:media type port#
For example:ExampleName#show interface serial 0
Here is an example of configuring a serial port with an IP address:ExampleName#configExampleName(config)#interface serial 1/1ExampleName(config-if)#ip address 192.168.155.2 255.255.255.0ExampleName(config-if)#no shutdownExampleName(config-if)#ctrl-ZExampleName#
Then to verify configuration:ExampleName#show interface serial 1/1
Note the no shutdown command. An interface may be correctly configured and physically connected, yet be "administratively down." In this state it will not function. The command for causing an interface to be administratively down is shutdown.ExampleName(config)#interface serial 1/1ExampleName(config-if)#shutdownExampleName(config-if)#ctrl-ZExampleName#show interface serial 1/1
In the Cisco IOS, the way to reverse or delete the results of any command is to simply put no infront of it. For instance, if we wanted to unassign the IP address we had assigned to interface serial 1/1:ExampleName(config)#interface serail 1/1ExampleName(config-if)#no ip address 192.168.155.2 255.255.255.0ExampleName(config-if)ctrl-ZExampleName#show interface serial 1/1
Configuring most interfaces for LAN connections might consist only of assigning a network layer address and making sure the interface is not administratively shutdown. It is usually not necessary to stipulate data-link layer encapsulation. Note that it is often necessary to stipulate the appropriate data-link layer encapsulation for WAN connections, such as frame-relay and ATM. Serial interfaces default to using HDLC. A discussion of data-link protocols is outside the scope of this document. You will need to look up the IOS command encapsulation for more details.
3.3 Configuring Cisco Routing
IP routing is automatically enabled on Cisco routers. If it has been previously disabled on your router, you turn it back on in config mode with the command ip routing.ExampleName(config)#ip routingExampleName(config)#ctrl-Z
There are two main ways a router knows where to send packets. The administrator can assign static routes, or the router can learn routes by employing a dynamic routing protocol.
These days static routes are generally used in very simple networks or in particular cases that necessitate their use. To create a static route, the administrator tells the router operating system that any network traffic destined for a specified network layer address should be forwarded to a similiarly specified network layer address. In the Cisco IOS this is done with the ip route command.ExampleName#configExampleName(config)#ip route 172.16.0.0 255.255.255.0 192.168.150.1ExampleName(config)#ctrl-ZExampleName#show ip route
Two things to be said about this example. First, the packet destination address must include the subnet mask for that destination network. Second, the address it is to be forwarded to is the specified addres of the next router along the path to the destination. This is the most common way of setting up a static route, and the only one this document covers. Be aware, however, that there are other methods.
Dynamic routing protocols, running on connected routers, enable those routers to share routing information. This enables routers to learn the routes available to them. The advantage of this method is that routers are able to adjust to changes in network topologies. If a route is physically removed, or a neighbor router goes down, the routing protocol searches for a new route. Routing protocols can even dynamically choose between possible routes based on variables such as network congestion or network reliability.
There are many different routing protocols, and they all use different variables, known as "metrics," to decide upon appropriate routes. Unfortunately, a router needs to be running the same routing protocols as its neighbors. Many routers can, however, run mutliple protocols. Also, many protocols are designed to be able to pass routing information to other routing protocols. This is called "redistribution." The author has no experience with trying to make redistribution work. There is an IOS redistribute command you can research if you think this is something you need. This document's compagnion case study describes an alternative method to deal with different routing protocols in some circumstances.
Routing protocols are a complex topic and this document contains only this superficial description of them. There is much to learn about them, and there are many sources of information about them available. An excelent source of information on this topic is Cisco's website, http://www.cisco.com.
This document describes how to configure the Routing Information Protocol (RIP) on Cisco routers. From the command-line, we must explicitly tell the router which protocol to use, and what networks the protocol will route for.ExampleName#configExampleName(config)#router ripExampleName(config-router)#network aa.bb.cc.ddExampleName(config-router)#network ee.ff.gg.hhExampleName(config-router)#ctrl-ZExampleName#show ip protocols
Now when you issue the show ip protocols command, you should see an entry describing RIP configuration.
3.4 Saving your Cisco Router configuration
Once you have configured routing on the router, and you have configured individual interfaces, your router should be capable of routing traffic. Give it a few moments to talk to its neighbors, then issue the commands show ip route and show ip arp. There should now be entries in these tables learned from the routing protocol.
If you turned the router off right now, and turned it on again, you would have to start configuration over again. Your running configuration is not saved to any perminent storage media. You can see this configuration with the command show running-config.ExampleName#show running-config
You do want to save your successful running configuration. Issue the command copy running-config startup-config.ExampleName#copy running-config startup-config
Your configuration is now saved to non-volatile RAM (NVRAM). Issue the command show startup-config.ExampleName#show startup-config
Now any time you need to return your router to that configuration, issue the command copy startup-config running-config.ExampleName#copy startup-config running-config
3.5 Example Cisco Router configuration
Router>enable
Router#config
Router(config)#hostname N115-7206
N115-7206(config)#interface serial 1/1
N115-7206(config-if)ip address 192.168.155.2 255.255.255.0
N115-7206(config-if)no shutdown
N115-7206(config-if)ctrl-z
N115-7206#show interface serial 1/1
N115-7206#config
N115-7206(config)#interface ethernet 2/3
N115-7206(config-if)#ip address 192.168.150.90 255.255.255.0
N115-7206(config-if)#no shutdown
N115-7206(config-if)#ctrl-z
N115-7206#show interface ethernet 2/3
N115-7206#config
N115-7206(config)#router rip
N115-7206(config-router)#network 192.168.155.0
N115-7206(config-router)#network 192.168.150.0
N115-7206(config-router)#ctrl-z
N115-7206#show ip protocols
N115-7206#ping 192.168.150.1
N115-7206#config
N115-7206(config)#ip name-server 172.16.0.10
N115-7206(config)#ctrl-z
N115-7206#ping archie.au
N115-7206#config
N115-7206(config)#enable secret password
N115-7206(config)#ctrl-z
N115-7206#copy running-config startup-config
N115-7206#exit
4. Troubleshooting your Cisco router
Inevitably, there will be problems. Usually, it will come in the form of a user notifying you that they can not reach a certain destination, or any destinattion at all. You will need to be able to check how the router is attempting to route traffic, and you must be able to track down the point of failure.
You are already familiar with the show commands, both specific commands and how to learn what other show commands are available. Some of the most basic, most useful commands you will use for troubleshooting are:ExampleName#show interfacesExampleName#show ip protocolsExampleName#show ip routeExampleName#show ip arp
4.1 Testing connectivity
It is very possible that the point of failure is not in your router configuration, or at your router at all. If you examine your router's configuration and operation and everything looks good, the problem might be be farther up the line. In fact, it may be the line itself, or it could be another router, which may or may not be under your administration.
One extremely useful and simple diagnostic tool is the ping command. Ping is an implementation of the IP Message Control Protocol (ICMP). Ping sends an ICMP echo request to a destination IP address. If the destination machine receives the request, it responds with an ICMP echo response. This is a very simple exchange that consists of:
Hello, are you alive?
Yes, I am.ExampleName#ping xx.xx.xx.xx
If the ping test is successful, you know that the destination you are having difficulty reaching is alive and physically reachable.
If there are routers between your router and the destination you are having difficulty reaching, the problem might be at one of the other routers. Even if you ping a router and it responds, it might have other interfaces that are down, its routing table may be corrupted, or any number of other problems may exist.
To see where packets that leave your router for a particular destination go, and how far, use the trace command.ExampleName#trace xx.xx.xx.xx
It may take a few minutes for this utility to finish, so give it some time. It will display a list of all the hops it makes on the way to the destination.
4.2 debug commands
There are several debug commands provided by the IOS. These commands are not covered here. Refer to the Cisco website for more information.
4.3 Hardware and physical connections
Do not overlook the possibility that the point of failure is a hardware or physical connection failure. Any number of things can go wrong, from board failures to cut cables to power failures. This document will not describew troubleshooting these problems, except for these simple things.
Check to see that the router is turned on. Also make sure that no cables are loose or damaged. Finally, make sure cables are plugged into the correct ports. Beyond this simple advice you will need to check other sources.
4.4 Out of your control
If the point of failure is farther up the line, the prolem might lie with equipment not under your administration. Your only option might be to contact the equipment's administrator, notify them of your problem, and ask them for help. It is in your interest to be courtious and respectful. The other administrator has their own problems, their own workload and their own priorities. Their agenda might even directly conflict with yours, such as their intention to change dynamic routing protocols, etc. You must work with them, even if the situation is frustrating. Alienating someone with the power to block important routes to your network is not a good idea

Wednesday, January 30, 2008

Mail Server


To configure a mail server, start the Configure Your Server Wizard by doing either of the following:
From Manage Your Server, click Add or remove a role. By default, Manage Your Server starts automatically when you log on. To open Manage Your Server, click Start, click Control Panel, double-click Administrative Tools, and then double-click Manage Your Server.
To open the Configure Your Server Wizard, click Start, click Control Panel, double-click Administrative Tools, and then double-click Configure Your Server Wizard.
On the Server Role page, click Mail server (POP3, SMTP), and then click Next.
This section covers:
Configure POP3 Service
On the Configure POP3 Service page, under Authentication method, click the appropriate method for your deployment. The Windows Server 2003 family supports the authentication methods listed in the following table.
Use this authentication method
When
Local Windows accounts
Your mail server is not an Active Directory
member server, and you want to store user accounts on the server on which the POP3 service is installed
Active Directory-Integrated
Your mail server is a domain controller or a member server
Encrypted Password File
Your mail server is not using Active Directory, or you do not want to have user accounts for the POP3 service on the local computer
The authentication methods that are available to you depend on the configuration of your server:
If the computer on which the POP3 service is running is a member server in an Active Directory domain, all three authentication methods are available.
If the computer on which the POP3 service is running is a domain controller, the available authentication methods are Active Directory integrated authentication and encrypted password file authentication.
Otherwise, the available authentication methods are local Windows accounts authentication and encrypted password file authentication.
Under E-mail domain name, type your registered e-mail domain name. You can create additional e-mail domains later by using the POP3 service snap-in or the Winpop command-line tool.
After you finish, click Next
Summary of Selections
On the Summary of Selections page, you can view and confirm the options that you have selected. If you selected Mail server (POP3, SMTP) on the Server Role page, the following appears:
Install POP3 and Simple Mail Transfer Protocol (SMTP) to enable POP3 mail clients to send and receive mail
To apply the selections shown on the Summary of Selections page, click Next. After you click Next, the Configuring Components page of the Windows Components Wizard appears, and then closes automatically. You cannot click Back or Next on this page.
Completing the Configure Your Server Wizard
After the components are configured, the Configure Your Server Wizard displays the This Server is Now a Mail Server page. To review all of the changes made to your server by the Configure Your Server Wizard or to ensure that a new role was installed successfully, click Configure Your Server log. The Configure Your Server Wizard log is located at systemroot\Debug\Configure Your Server.log. To close the Configure Your Server Wizard, click Finish.
At this stage, you have a fully-functioning mail server, but you must also create mailboxes for all of the users in the domain who will be sending or receiving e-mail. Without mailboxes, users cannot send or receive e-mail.
Creating mailboxes
To send and receive e-mail, each user must have a unique mailbox in the e-mail domain. You can create mailboxes from either the POP3 service MMC snap-in or at the command line. This procedure uses the POP3 service MMC snap-in. For more information about creating mailboxes or administering the POP3 service at the command line, see Winpop. For more information about creating mailboxes, see To create a mailbox.
Step
Comments
Open the POP3 service MMC snap-in.
To open the POP3 service snap-in, click Start, click Control Panel, double-click Administrative Tools, and then double-click POP3 Service.
Notes
To perform this procedure, you must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure.
If you are using Active Directory integrated authentication, you must log on to the Active Directory domain, not the local computer, to perform this procedure.
Create one or more mailboxes.
In the console tree, select the e-mail domain that you specified in the Configure Your Server Wizard (for example, example.com). Right-click the e-mail domain, point to New, and then click Mailbox. Provide the following information:
Mailbox Name—the name of the mailbox. The maximum length for a mailbox name is 20 characters for local Windows accounts authentication, and 64 characters for encrypted password file authentication or Active Directory integrated authentication. The minimum length is 1 character.
Password—the password to access the mailbox.
Confirm Password—retype the password that was specified in Password.
If you are using Active Directory integrated authentication or local Windows accounts authentication, select the Create associated user for this mailbox check box, unless a user account already exists with the same name as the mailbox that you want to create. If the check box is already selected, clear it only if an account already exists with the same name as the mailbox that you want to create.
Removing the mail server role
If you need to reconfigure your server for a different role, you can remove existing server roles. By removing the mail server role, you will uninstall all mail server components, such as the POP3 service and SMTP service. After the mail server components are uninstalled, users will no longer be able to send or receive e-mail using that server. Any e-mail that is stored on the computer will not be affected by removing the mail server role and will remain in the mail store.
To remove the mail server role, restart the Configure Your Server Wizard by doing either of the following:
From Manage Your Server, click Add or remove a role. By default, Manage Your Server starts automatically when you log on. To open Manage Your Server, click Start, click Control Panel, double-click Administrative Tools, and then double-click Manage Your Server.
To open the Configure Your Server Wizard, click Start, click Control Panel, double-click Administrative Tools, and then double-click Configure Your Server Wizard.
On the Server Role page, click Mail server (POP3, SMTP), and then click Next. On the Role Removal Confirmation page, review the items listed under Summary, select the Remove the mail server role check box, and then click Next. After you click Next, the Configuring Components page of the Windows Components Wizard appears, and then closes automatically. You cannot click Back or Next on this page. On the Mail Server Role Removed page, click Finish.
Next steps: Completing additional tasks

After you complete the Configure Your Server Wizard and create mailboxes, the computer is ready for use as a mail server. Up to this point, you have completed the following tasks:
Installed the POP3 service and the SMTP service.
Configured the POP3 service to use an authentication method.
Created an e-mail domain.
Created mailboxes.
The Configure Your Server Wizard automatically installs the POP3 service MMC snap-in, which you use to manage your mail server. To open the POP3 service snap-in, click Start, click Control Panel, double-click Administrative Tools, and then double-click POP3 Service.
The following table lists additional tasks that you might want to perform on your mail server.
Task
Purpose of task
Reference
Provide users with the procedure to configure their e-mail clients to use the mail server.
To connect to the mail server, the user's e-mail client must be configured specifically for the mail server.

Implement disk quotas.
Disk quotas ensure that the mail store does not use an excessive or unanticipated amount of disk space, which could adversely affect the performance of the server on which the POP3 service is running. You must have an NTFS partition to implement disk quotas. NTFS partitions allow for greater directory and folder security, which better protects e-mail stored on the local hard disk.
Configuring disk quotas for the POP3 service
Configure your mail server to require secure e-mail client authentication.
The POP3 service supports Secure Password Authentication (SPA) for Active Directory integrated authentication and local Windows accounts authentication. Secure Password Authentication requires that all e-mail clients transmit both the user name and password using secure authentication. Secure Password Authentication is more secure than the default of
plaintext and, therefore, is recommended over plaintext. Secure Password Authentication must be configured on both the server on which e-mail services are running and on every e-mail client that will connect to the mail server.
Express for Secure Password Authentication!
To configure the mail server to require Secure Password Authentication
Using the Windows interface
Open POP3 service
In the console tree, right-click the computer_name node and click Properties.
Where?
POP3 Service
computer_name
Select Require Secure Password Authentication (SPA) for all client connections.
Important
If you change this parameter, you must stop and restart the POP3 service. For more information on changing the POP3 service state, see Related Topics.
Notes
To perform this procedure, you must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure.
To open the POP3 service snap-in, click Start, click Control Panel, double-click Administrative Tools, and then double-click POP3 Service.
SPA supports only Active Directory integrated authentication and local Windows accounts authentication.
If you enable SPA, users' e-mail clients must also be configured to use SPA. For more information, see Related Topics.
If you are using Active Directory integrated authentication, you must log on to the Active Directory domain, not the local computer, to perform this procedure.
Configuring the mail server to require Secure Password Authentication affects only the POP3 service and not the Simple Mail Transfer Protocol (SMTP) service. For more information about
the security options for the SMTP service, see Set Security Options.
Using a command line
Open Command Prompt.
Type:
winpop set sparequired {01}
Value
Description
winpop set sparequired
Specifies whether Secure Password Authentication is required for all client connections.
{01}
Specifies whether secure authentication is required from all e-mail clients.
The default is 0, which specifies that SPA is not required. 1 requires SPA from all e-mail clients and prevents e-mail clients from authenticating by using plaintext authentication.
Important
If you change this parameter, you must stop and restart the POP3 service. For more information on changing the POP3 service state, see Related Topics.
Notes
To perform this procedure, you must be a member of the
Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure.
To open a command prompt, click Start, point to All Programs, point to Accessories, and then click Command Prompt.
SPA supports only Active Directory integrated authentication and local Windows accounts authentication.
If you enable SPA, users' e-mail clients must also be configured to use SPA. For more information, see Related Topics.
If you are using Active Directory integrated authentication, you must log on to the Active Directory domain, not the local computer, to perform this procedure.
To view the complete syntax for this command, at a command prompt, type:
winpop set help
Configuring the mail server to require Secure Password Authentication affects only the POP3 service and not the Simple Mail Transfer Protocol (SMTP) service. For more information about
the security options for the SMTP service, see Set Security Options.
To configure Outlook Express for Secure Password Authentication
Click Start, point to All Programs, and then click Outlook Express.
On the Tools menu, click Accounts.
In Internet Accounts, click the Mail tab, click the name of your POP3 e-mail account, and then click Properties.
Click the Servers tab, and then click Log on using Secure Password Authentication.
In Account name, type your POP3 service user name not including the domain. For example, if your e-mail address is someone@example.com, you would type:
someone and then click OK. If a naming conflict occurred when the mailbox was created, the user name is the pre-Windows 2000 logon name. For more information about the pre-Windows 2000 logon name, see Notes.
Notes
Secure Password Authentication (SPA) only supports Active Directory integrated authentication and local Windows accounts authentication.
Be sure to update your e-mail client software and client operating system with the latest service pack available.
If you are using an e-mail client other than Outlook Express, check your product documentation for information about how to configure your e-mail client to use Secure Password Authentication (SPA) (also known as NTLM Authentication).
If a dialog box prompts you for your
credentials after you configure Outlook Express for SPA, enter your credentials, as described in the following table:
Value
Description
User Name
Your user name, not including the domain. For example, if your e-mail address is someone@example.com, you would type:
someoneIf a naming conflict occurred when the mailbox was created, the user name is the pre-Windows 2000 logon name.
Password
Your password.
Domain
For Active Directory integrated authentication, this is the network basic input/output system (NetBIOS) name of the domain. For local Windows accounts authentication, this is the name of the local computer.
If you are using Active Directory integrated authentication and Secure Password Authentication and a naming conflict occurred when the mailbox was created, the pre-Windows 2000 logon name must be used for e-mail client authentication. To determine the modified logon name, go to the Active Directory Users and Computers snap-in in Administrative Tools. Go to the Users folder, right-click the user account, and then click Properties. Click the Account tab and the modified account name will appear in User logon name (pre-Windows 2000). You must note the pre-Windows 2000 logon name and provide it to the user.
Related Topics
Configuring disk quotas for the POP3 service
Important
You can configure disk quotas only on
NTFS file system partitions.
You can use disk quotas to control and limit the amount of disk space individual mailboxes on the mail server can use. This ensures that individual mailboxes, and the mail store in general, do not use excessive or unanticipated amounts of disk space and adversely affect the performance of the server where the POP3 service is running.
For example, if the mail server suddenly receives a large volume of unsolicited e-mail, the mail store expands rapidly and might use all of the available disk space on the hard disk. If you implement quotas, the mail store only expands to the quota limit that you specified. As a result, no more mail is accepted by the server, and the rest of the server still functions normally.
If you are using Active Directory integrated authentication or local Windows accounts authentication, the e-mail delivered to a POP3 service mailbox will have file ownership assigned to the mailbox user by default. A quota file is created in the mailbox directory that contains the security identifier (SID) of the user account associated with the mailbox. File ownership is then assigned to the user account that corresponds to the SID contained in the quota file. The SID is also used by the NTFS file system disk quota system to enforce the quota limits specified on the user account matching the SID. All e-mail transferred to the mailbox's mail store directory is marked with the SID contained in the quota file; this marks the e-mail so it can be monitored by the quota system.
For more information, see Disk quotas.
createquotafile command
If you are using encrypted password file authentication, there is no valid user account for the mailbox that the quota system can use. You can use the createquotafile /user command, however, to manually associate a given mailbox with a valid user account that is configured to have a disk quota. This association is for disk quota purposes only and is separate from mailbox authentication. If you are using Active Directory integrated authentication or local Windows accounts authentication, a quota fil
e is created by default when you create a mailbox.
For more information about the createquotafile command, see To create a quota file.
Configuring domain disk quotas
Although quotas are designed to be implemented on a per-mailbox basis, you can create a domain-wide disk quota.
To create a disk quota for a domain, you must create a new mailbox and user account with an associated quota. The quota file for the new mailbox functions as a template that you can then copy into all of the other mailbox directories in the domain to create a domain-wide quota policy.
The following table describes the steps for creating a domain disk quota.
Step
Reference
Create a new mailbox and user account. When you create the new mailbox, you must also create an associated user account for the mailbox. This account will be used to create a domain-wide quota. Other accounts in the domain can be configured to reference this account and its associated quota. All accounts associated with this account will have their disk usage aggregated under a single quota limit, which will create a domain-wide quota limit.
To create a mailbox
Enable disk quotas for the partition on which the mail store is configured.
To enable disk quotas
Create a quota to be used as the domain quota and assign it to the domain quota account.
To add new quota entries
Do one of the following:
Copy the quota file from the mail store directory of the domain account to the corresponding mail store directory of all the mailboxes in the domain.
Or, using the winpop createquotafile command and the /user: switch, associate one or more accounts in the domain with the domain account and its quota. For more information on the createquotafile command, see
To create a quota file.
N/A
Notes
When a mailbox quota is exceeded, the user is not notified. E-mail intended for the user is not accepted, and a Non-Delivery Report (NDR), a notice that the e-mail was not delivered to the recipient, is returned to the sender.
Be sure that users configure their e-mail client to delete from the server any e-mail that has been successfully retrieved. If users leave successfully retrieved e-mail on the server, they can quickly exceed their quota. Users are likely to be unaware of the disk usage and impact of old e-mail stored on the server.
You cannot set quota limits on the accounts of Administrators or members of the Administrators group.

File and Print Server

How To Install and Configure a File and Print Server in Windows Server 2003
Contents
Install File and Printer Sharing
How to Install a File Server on Windows Server 2003 by Using the Configure Your Server Wizard
How to Manually Install a File Server on Windows Server 2003
How to Install a Print Server on Windows Server 2003 by Using the Configure Your Server Wizard
How to Share a Printer
How to Manually Install a Print Server on Windows Server 2003
Install File and Printer Sharing

By default, a Windows Server 2003-based computer is installed with Client for Microsoft Networks, File and Printer Sharing for Microsoft Networks, and TCP/IP.NOTE: You can view these services in the properties for the local area connection.You can create a Windows Server 2003 file server and print server manually, or you can use the wizards that are provided in the Configure Your Server Wizard administrative tool.
How to Install a File Server on Windows Server 2003 by Using the Configure Your Server Wizard

1.
Click Start, point to Administrative Tools, and then click Configure Your Server Wizard.
2.
Click Next.
3.
Click Next.
4.
Click File server in the Server role box, and then click Next.
5.
On the "File Server Disk Quotas" page, configure any quotas you need to control disk-space usage on the server, and then click Next.
6.
On the "File Server Indexing Service" page, click the indexing configuration that is appropriate for your server, and then click Next.
7.
Click Next.
8.
Click Finish.
9.
The Share a Folder Wizard starts. Click Next.
10.
Click Browse, locate the folder that you want to share, and then click OK.
11.
Click Next.
12.
Type a share name for the folder, and then click Next.
13.
Click one of the basic permissions for the folder, or click Customize to set custom permissions on the folder. Click Finish.
14.
Click Close.

How to Manually Install a File Server on Windows Server 2003

1.
Click Start, and then click Windows Explorer.
2.
Locate the folder that you want to share.
3.
Right-click the folder, and then click Sharing and Security.
4.
Click Share this folder, and then accept the default name or type a different name for the share.
5.
Optionally, configure the number of users who can connect, configure permissions for this folder, and then configure the caching options.
6.
Click OK.
7.
A little hand is displayed in the Windows Explorer window to indicate that the folder is being shared.
8.
Quit Windows Explorer.
Back to the top


How to Install a Print Server on Windows Server 2003 by Using the Configure Your Server Wizard

1.
Click Start, point to Administrative Tools, and then click Configure Your Server Wizard.
2.
Click Next.
3.
Click Next.
4.
Click Print server in the Server role box, and then click Next.
5.
On the "Printers and Printer Drivers" page, click the types of Windows clients that your print server will support, and then click Next.
6.
Click Next.
7.
On the "Add Printer Wizard Welcome" page, click Next.
8.
Click Local printer attached to this computer, click to clear the Automatically detect and install my Plug and Play printer check box, and then click Next.
9.
Click the port for your printer, and then click Next.
10.
Click the printer make and model or provide the drivers from the printer manufacturer media, and then click Next.NOTE: If you are prompted to keep or not keep your existing printer driver, either keep the existing driver or replace the existing driver. If you replace the driver, you must provide the manufacturer driver for this printer. Click Next to continue.
11.
Accept the default name of the printer or provide a different name, and then click Next.
12.
Click the Share as option, type the share name, and then click Next.NOTE: This step is optional because you can share the printer later.
13.
You may provide the location of the printer and a comment to make it easier to locate. Click Next to continue.
14.
Click the Print a test page option, click Next, and then click Finish to quit the Add Printer Wizard. Your printer appears in the Printers and Faxes folder.

How to Share a Printer

1.
Click Start, and then click Printers and Faxes.
2.
Right-click the printer that you just installed, and then click Sharing.
3.
Click Share this printer, and then type a share name for the printer.
4.
Optionally, click Additional Drivers, click the operating systems of the client computers that may attach to this printer, and then click OK. By adding drivers for these operating systems, users on client computers can connect to the print server and automatically download the appropriate drivers for this model of printer without having to configure anything.
5.
When you are prompted to do so, insert the Windows Server 2003 CD-ROM.
6.
Click OK to close the printer properties.
7.
Close the Printers and Faxes folder.

How to Manually Install a Print Server on Windows Server 2003

1.
Click Start, point to Settings, and then click Printers.
2.
Double-click Add Printer to start the Add Printer Wizard.
3.
To complete the Add Printer Wizard, repeat steps 7 through 14 in the "Install a Windows Server 2003 Print Server" section of this article.
NOTE:
The only difference between the manual installation of the print server and the use of the Configure Your Server Wizard to create the print server is how you start the Add Printer Wizard.

Wednesday, January 23, 2008

Web Server (WEB)

Creating a Web Site

The simplest approach is to use a separate IP address to identify each web site on your machine. Let's say our server has five IP addresses assigned to it from the range 172.16.11.220 through 172.16.11.224. Before we create a new Human Resources web site, let's first examine the identify of the Default Web Site. Open IIS Manager in Administrative Tools, select Web Sites in the console tree, and right-click on Default Web Site and open it's properties:The IP address for the Default Web Site is All Unassigned. This means any IP address not specifically assigned to another web site on the machine opens the Default Web Site instead. A typical use for the Default Web Site is to edit it's default document to display general information like a company logo and how to contact the Support Desk.Let's use IP address 172.16.11.221 for the Human Resources site and make D:\HR the folder where the home page for this site is stored. To create the HR site, right-click on the Web Sites node and select New --> Web Site. This starts the Web Site Creation Wizard. Click Next and type a description for the site:Click Next again and specify 172.16.11.221 as the IP address for the site:Click Next and specify D:\HR as the home folder for the site. We've cleared the checkbox to deny anonymous access to the site because this is an internal intranet so only authenticated users should be able to access it (public web sites generally allow anonymous access):Click Next and leave only Read access enabled since the Human Resources site will initially only be used to inform employees of company policies:Click Next and then Finish to create the new web site:Now let's create another intranet site, this time for Help Desk, which will use IP address 172.16.11.222 and home folder D:\Help. We'll create this one using a script instead of the GUI:And here's the result:The script we used here is Iisweb.vbs, one of several IIS administration scripts available when you install IIS on Windows Server 2003. The basic syntax of this script is easy to figure out from the previous screenshot, and a full syntax can be found here. Note that unlike the Web Site Creation Wizard used previously. you can't use this script create a web site with anonymous access disabled. So if you want to disable anonymous access you should do it by opening the properties sheet for the Help Desk site, selecting the Directory Security tab, and clicking the Edit button under Authentication and Access Control. This opens the Authentication Methods box where you can clear the checkbox to disable Anonymous Access and leave Windows Integrated Authentication as the only authentication method available for clients on your network:Creating a Local Virtual DirectoryLet's say Human Resources keeps their policies in a folder called D:\HR Policies on your web server and you would like users to be able to use the URL http://172.16.11.221/policies when they need to access these policies. To do this we need to create a virtual directory that associates the /policies portion of the URL, called the alias for the virtual directory, with the physical directory D:\HR Policies where these documents are actually located.Let's do this now. Right-click on the Human Resources site and select New --> Virtual Directory to start the Virtual Directory Creation Wizard. Click Next and type the alias for the virtual directory:Click Next and specify the physical folder on the local server to map to this alias:Click Next and specify permissions (again we'll just leave Read enabled) and finish the wizard. Here's the result:Let's do something similar using another IIS script named Iisvdir.vbs, only we'll create a /procedures virtual directory instead:Open IIS Manager to display the new virtual directory:Note the difference in the icons for the two virtual directories. That's because when the script creates a virtual directory it also creates an application starting point for that directory, while the wizard does not. This doesn't matter though, since for now we're only hosting static content in these directories. For the full syntax of Iisvdir.vbs see here.Creating a Remote Virtual DirectoryHelp Desk likes to do things differently than Human Resources does, and their user manual is stored in HTML form in the share \\srv230\helpdesk on a network file server. Let's create a remote virtual directory within the Help Desk site that associates the alias /usermanual with this share. Right-click on the Help Desk site and select New --> Virtual Directory to start the Virtual Directory Creation Wizard again, specify usermanual as the alias for the directory, and type \\srv230\helpdesk as the UNC path to the share:Click Next and a new screen appears prompting you to either specify credentials for accessing the share or use the authenticated user's credentials for this purpose (we'll use the latter):Click Next and finish the wizard. Let's look at the result:The Iisvdir.vbs script can similarly be used for creating remote virtual directories.Controlling Access to a Web SiteNow that we have a couple of web sites and virtual directories created, let's look at a few administration tasks. This will be only a brief overview--you can find a much more detailed treatment of the subject in my book IIS 6 Administration (Osborne/McGraw-Hill).First let's look at how we can control access to our web sites. There are basically four ways you can do this: NTFS Permissions, web permissions, IP address restrictions, and authentication method. NTFS permissions is your front line of defense but it's a general subject that we can't cover in detail here. Web permissions are specified on the Home Directory tab of your web site's properties:By default only Read permission is enabled, but you can also allow Write access so users can upload or modify files on your site.Script source access so users can view the code in your scripts (generally not a good idea), or Directory browsing so users can view a list of files in your site (also not a good idea). Web permissions apply equally to all users trying to access your site, and they are applied before NTFS permissions are applied. So if Read web permission is denied but NTFS Read permission is allowed, users are denied access to the site.IP address restrictions can be used to allow or deny access to your site by clients that have a specific IP address, have an IP address within a range of addresses, or have a specific DNS domain name. To configure this, select the Directory Security tab and click the Edit button under IP Address and Domain Name Restrictions. This opens the following dialog, which by default does not restrict access to your site:The main thing to watch for here is that denying access based on domain name involves reverse DNS lookups each time clients try to connect to your web site, and this can significantly impact the performance of your site.The final way of controlling access to your sites is to use the Authentication Methods dialog box we looked at previously:In summary, the five authentication options displayed here are:Anonymous access. Used mainly for web sites on public (Internet) web servers.Integrated Windows authentication. Used mainly for web sites on a private intranet.Digest authentication. Challenge/response authentication scheme that only works with clients running Internet Explorer 5.0 or later.Basic authentication. Older authentication scheme that transmits passwords over the network in clear text, so use this only in conjunction with SSL..NET Passport authentication. Allows users to use their .NET Passport for authentication.Configuring Web Site LoggingSince web sites are prime targets for attackers, you probably want to log hits to your site to see who's visiting it. By default IIS 6 logs traffic to all content as can be seen on the bottom of the General tab of the properties for a web site or virtual directory:The default logging format is the W3C Extended Log File Format, and clicking Properties indicates new log files are created daily in the indicated directory. It's a good idea to specify that local time be used for logging traffic as this makes it easier to interpret the logs:The key of course is to review log files regularly to look for suspicious activity. IIS doesn't include anything for this purpose, but the IIS 6.0 Resource Kit Tools does include version 2.1 of Microsoft Log Parser, which can be used for analyzing IIS logs. You can download these tools here.Configuring Web Site RedirectionSometimes you need to take your web site down for maintenance, and in such cases it's a good idea to redirect all client traffic directed to your site to an alternate site or page informing users what's going on. IIS lets you redirect a web site to a different file or folder on the same or another web site or even to an URL on the Internet. To configure redirection you use the Home Directory tab and choose the redirection option you want to use:Stopping and Starting Web SitesFinally, if sites become available you may need to restart IIS to get them working again. Restarting IIS is a last resort as any users currently connected will be disconnected and any data stored in memory by IIS applications will be lost. You can restart IIS using IIS Manager by right-clicking on the server node:

Exchage Server (ES)

How to install Exchange Server1.
Log on using the primary Exchange account that you specified when you ran the Exchange 2003 ForestPrep. When you specified this account, ForestPrep gave it the full Exchange Administration rights.2. Insert the Exchange 2003 installation CD-ROM.3. Start Windows Explorer, navigate to the \setup\i386 folder on the CD-ROM, then double-click setup.exe.4. The Microsoft Exchange Installation Wizard will start. Click Next.5. Click "I agree" to the license agreement, then click Next.6. You now need to select which components you want to install; under Action, click Typical as this figure shows, then click Next.7. Select the option to "Create a new Exchange Organization," as this figure shows, then click Next.8. The wizard will prompt you for the organization name--enter a name, as this figure shows (typically the company name). Be aware that after you enter it, the organization name isn't easy to change.9. Confirm the license regarding per-seat licensing by selecting the "I agree that I have read and will be bound by the license agreements for this product" check box, then click Next.10. The wizard will display the summary of installation actions. Click Next.11. The installation will start and a progress screen will display the current actions. After the installation is complete, click Finish.12. If the system prompts you to restart the machine, click Yes.You're now ready to start configuring and using Exchange 2003.Configure Exchange 2003 ServerConfiguring your new Exchange 2003 server for internet email with POPcon for downloading the email from POP3 mailboxes isn't hard if you just do it step by step as shown in this configuration sample. In this guide we will step through a sample installation of Exchange 2003 for a company we will call "Mycompany". Mycompany consequently owns the internet domain name "mycompany.com".Actually it only takes these four steps:Adding your internet domain name to the recipient policiesConfiguring the SMTP server for inbound emailAdding a SMTP Connector for outbound emailsConfiguring the email addresses of your usersAnd this is how to configure the Exchange Server to accept email for mycompany.com and work with POPcon:First install the software from CD. You may have to go back to the "Add/remove Software" utility in the control panel to add NNTP support if you did not do so during initial setup of your windows installation. Then open the Exchange System Manager and configure the new Exchange installation.1. Adding your internet domain name to the recipient policiesOpen the Exchange System-Manager. It should look like this:One of the problems most often encountered when configuring an Exchange 2003 Server system is the fact that often the internet domain nane you want to receive email for ("mycompany.com") does not match your standard active directory domain name (i.e. "servername.mycompany.com"). The Exchange 2003 Server component handling incomming emails - the SMTP server - does not accept emails for other domains than the ones entered in the "recipient policies", even if you entered the correct email addresses ("user@mycompany.com") in the active directory.To make Exchange accept email for additional domains like your internet domain you need to add the domain names to the default recipient policy like this:On the main tree panel of the exchange system manager expand the tree "Recipients" and then click on "Recipient Policies". The policies will be shown on the right panel. Normally only the "Default Policy" will be there:Open the properties of the "Default Policy" by double-clicking it:In the Default Policy Properties please choose the tab "E-Mail Addresses". There you will find a list of domains supported by your exchange server. Usually only your internal active directory server domain will be listed here:Like you can see, after installing our Exchange Server from scratch only our AD domain "Christensen.local" was listed as accepted SMTP address. But emails from the internet will be comming in addressed to "@mycompany.com" and not Christensen.local!Choose "New..." here to add another accepted inbound domain. Since emails on the internet are sent via the SMTP protocol we want to add an "SMTP Address":Now enter the domain name you want to receive email for. Please add a leading "@" to the domain name. This is what we entered to support emails addressed to @mycompany.com:This is how the Default Policy Properties look like after entering the additional SMTP domain:Enable the newly created entry with a check mark next to it:When you OK the above dialog, Exchange will ask you with the next dialog box if you want to add the new address to all new users. Usually you do want exactly that to save some typing later.Please note: You may need to restart your server to activate the new domain!2. Configuring the SMTP server for inbound emailNext we will configure the SMTP-Server. This is the part of Exchange that accepts incomming emails from POPcon. No special settings are needed to work with POPcon but these are the standard settings in any case:You will find the settings for the SMTP server under Servers/Protocols/SMTP/Default SMTP Virtual Server. Open the properties by right-clicking on the Default SMTP Virtual Server and choosing "Properties":The settings on tab "General" can normally be left to the defaults.On the tab "Access" you can find some configuration settings that might interfere with POPcon.POPcon only works with a standard SMTP connection WITHOUT authentication, so allow "Anonymous access" in the "Authentication" dialog:Choose "Connection" to grant or refuse the right to connect to the SMTP server to individual or multiple IP Address Ranges. Please ensure the system POPcon runs on does have the right to connect granted. With this setting ALL systems will have access to your SMTP server:Under "Relay..." you can assign the right to relay through your SMTP-Server to some systems. This might be needed in some configuration and to be sure you should grant the system POPcon runs on relay rights. All other systems will need to authenticate before accessing the SMTP server to prevent unauthorized users using your system to relay spam:Under the "Messages" tab you can restrict message size and number of messages accepted for each connection. Please make sure these settings are liberal enough to allow POPcon to transmit large messages to your server.Also, on this tab you can choose an internal additional recipient for copies of the non-delivery reports. These NDRs will be sent back to senders of mails addressed to recipients unknown in your Exchange Server and they include a copy of the original message sent. You can use these postmaster copies of the NDRs to manually forward emails sent to mistyped recipients to the correct users.Under tab "Delivery" some more configuration settings for outgoing emails can be found:3. Adding the SMTP Connector for outbound emailsNow we need to add an SMTP-Connector (vs. SMTP Server) to handle outgoing email to the Internet.Right-click "Connectors" in the Exchange System Manager and choose "New", "SMTP-Connector" to start adding the new connector and name it appropriately (like "SMTP-Out" in our case):On the "General" tab you can now choose wether Exchange will send outgoing emails directly to the recipients system ("Use DNS...") or if all emails should be relayes through a SMTP relay server ("smart host").The first option, DNS, is more direct but can sometimes cause problems when you use a dialup internet connection because some recipient systems will not accept emails that are coming from you ISP's dialup IP range while pretending to come from your real internet domain. Sending via your ISP's smart host / smtp relay server is the better option in this case. We chose our ISPs smtp relay server here.Also, on this tab you need to add the "local bridgehead" server (as shown above)On the tab "Address Space" we need to add a wildcard address space for SMTP. We want to allow emails to any domain, so we use the wildcard "*" here:Side note about the "Cost" entry: If you want to send emails to some domains via a different route you can create multiple SMTP connectors and set the "Cost" entry of this wildcard connector to a higher value while setting the cost entry of the special domain route to a lower cost but with only the special domain allowed on this page. This is especially useful if you generally want to send via DNS and only route to some systems that won't accept your email via some relay server.If your ISP's SMTP server requires authentication (and almost all of them do today) you can set the username and password on the "Advanced" tab of the SMTP connector. Select "Outbound Security":Select "Basic authentication" and chose "Modify" to enter the username and password:And that's alreay it - Your Exchange is now configured to send email to the internet and receive an SMTP email feed like it will come from POPcon or a direct internet connection. All you should do now is configure your users' email addresses in the Active directory.4. Configuring your user's email addresses in the Active DirectoryYou can set one or multiple email addresses for each user to receive email at. We will step through the neccessary actions when creating a new user called John Galt.First open the active directory and right-click the "Users" item to select "New", "User":The resulting dialog will allow you to create a new AD user to log into your server and creates an Exchange mailbox all in one wizard pass:Next...Next...Now the wizard continues into the Exchange Server realm and lets us create a new exchange mailboxWe just accepted the default alias here. Next...Ok, fine - but wait: What about our desired email address? john@servolutions.com? We need to add this mail address manually. We are back at the AD configuration console and select the properties of our new user "John Galt" by right-clicking on the name:Lot's of tabs on this resulting dialog:We go to the "E-mail Addresses" tab:And surprise: john@servolutions.com is already there, but in suspiciously non-bold print. Actually, Exchange automatically entered this additional email address because we choose so during the editing of the default recipient policies. But we want this address to be the primary address meaning all email sent by John will get this address as the "senders" and "reply" addresses in the mail headers. So we click on "Set As Primary" and are done:We could also add more email addresses like info@servolutions.com or sales@servolutions.com but only one of these addresses can be the primary address that will be the default senders' address in all emails sent out by john.And that's really it - just step through you other user's AD entries and set the appropriate primary and additional email addresses.