A Project Report
[pic]
Linux Certification Lab
INTRODUCTION TO LINUX
LINUX is an open source / free software. With its advanced server configuration, Red Hat is putting Linux as an operating system at the core of enterprise computing. Today Linux is found in Web infrastructure, file server, ERP, and point of sale system, increasingly in the systems running critical applications at large companies. Analysts predict that by the end of this decade Linux will be a common element in the enterprise computing landscape.
“Over the last year, we’ve seen Linux go from being focused on small and medium business to being used very deep in the enterprise”, says Paul Cormier, executive vice president of engineering at Red Hat, a leading Linux platform provider.
Salient Features of LINUX
➢ Linux is the fastest operating system in the world. It runs much faster than Windows 9X/NT. It is about 1.2 to 3 times faster than Windows 9X/NT. In command-line console mode without X-window it runs even faster (console mode is ideal for Database servers, Apache Web servers, Email servers, News servers, File servers, DNS servers, Print servers, Network Computer servers, etc..). Linux is also the most powerful yet most simple and easy to use operating system in the world.
➢ Linux is the most reliable OS. Windows 9X/NT fails the CRASH_OS_TEST Programs and only Linux passes. Also commercial UNIX’s like IRIX, Solaris,HPUX, AIX, SCO all fail the crash test and Linux is the only OS which passes the crashme test. Very often Windows 95 users will get GPF errors and the system freezes. Linux is very robust because it is built by millions of people on internet and there are no errors in the kernel. It runs for one full year without any re-boots or any problems non-stop, guaranteed. It is the best designed OS.
➢ Linux has an excellent scalability - it runs on Uni-processor, Multi-processors, Parallel Processors and even Super-computers. It fully supports SMP (Symmetric Multi-Processing) boxes with more than one CPU. Windows 95 supports only one CPU box. Linux scales much better than NT on SMP.
➢ Linux is fully 32-bit & 64-bit operating system. And it is very modular and is already ported to 64-bit chips like DEC alpha, Sun Microsystems UltraSparc, Intel IA64, Motorola PowerPC, Transmeta Corp Crusoe chip and GNU/GPL Freedom 64-bit CPU. Whereas Windows 95 has a major chunks of 16-bit code in its kernel and MS Windows runs only on one type of chip - "Intel chip".
➢ Linux is a very secure OS. Windows 95 is not a secure OS, break-ins are easy. Windows 95/2000, NT, MSDOS have computer viruses. But Linux does not have any viruses. Computer viruses cause lot of damages to Windows 95/2000/NT but not to Linux.
➢ Linux is very mature and is one of the oldest operating system in the world. UNIX (which is another name for Linux) was born in AT&T Bell Labs 27 years ago for Telecom research. Linux (UNIX) is the end-result of 27 years of research and development effort by U.S/European Universities and mega-corporations of Europe / America. It took 27 years to create vast amount of UNIX information, and all that info is now just sitting inside this Linux cdrom on our hand. For example programs like 'grep' had not changed for the past 27 years and they are still used in Linux. Functionality and command line options of grep had not changed for the past 27 years. Linux started the Linux during 1991, but he borrowed lot of concepts, code from UNIX and this means Linux is 27 years old. Today Linux is the OCEAN wherein all other unixes like Solaris, HPUX, and AIX merge into. And in near future all other unixes will be replaced by Linux.
➢ Linux is less demanding on system resources. Linux runs on 386 PC with as little as 2 MB RAM in command-line console mode. Windows 95/NT cannot because the graphic engine is included in the kernel, which makes Windows 95/NT a resource hog. Graphic engine makes the Windows 95/NT extremely unreliable and unpredictable. Linux can do everything that Windows 95/NT does but Windows 95/NT cannot do everything which Linux does. In Windows 95/NT there is no option for the user to run in command-line console mode without any graphics. Unlike Windows95, X-window can run with very minimum resources, it runs on 486 boxes with just 8MB of RAM.
➢ Linux uses X-window which is an advanced network-windowing system, whereas Windows 95/NT is a standalone single-workstation windowing system. For example, using X-window, users can display output on any workstation-monitor attached anywhere in the network. There is a command called "xhost" in Linux and display environment variable, export display=`hostname`:0.0. Like this there are lots of functionalities in X-window which are missing in Windows NT/95. X-Window is an industry standard which was developed in MIT and is a very powerful network windowing system. With X-window you can run programs on super-computers and display on your Linux desktop locally. Even though X-window is network-resource intensive, it is becoming increasingly popular because of the availability of very low cost, high speed networking like 1 Gig bit Ethernet cards, 100 Megabit Ethernet cards, DSL lines, Cable-Modems, Frame-relay and ATM networks.
➢ Linux has very low total_cost_of_ownership since Linux supports diskless nodes. Cost of maintaining Linux is five times lower than MS Windows.
➢ Linux supports remote system administration whereas Windows NT/95 does not. We can remote login and do many system administration tasks, for example like adding users, reboot a Linux server from a remote terminal hundreds of miles.
➢ Linux runs most windows applications (16bit) like MSOffice, MSWord using WABI ($40), WINE (free) and MSDOS applications using DOSemu, FreeDOS, and Dr.DOS. But Windows95/NT will run only few of UNIX and Linux applications.
➢ Linux supports su (super user) command. Using su command it is possible to switch user without logging off. For example 'su - root' will login as user 'root'. In Windows NT/95 you must log off completely to switch user. Linux has remote commands like 'rlogin', telnet, etc. While Windows NT/95 does not have.
➢ Linux kernel is very small and it can fit on a single floppy. It is less complex but very sophisticated and powerful. Small kernel means it is very reliable. Linux applications are much bigger running on top of the Linux Kernel.
➢ Linux has many powerful desktops like KDE desktop, GNOME, Triteal CDE, Motif mwm, Open look olwm, twm, fvwm95, xdm, xsm, Windows Afterstep, Window maker (NeXTstep-lookalike), Qvwm, amiwm (amiga), mlvwm (mac) etc. KDE desktop is much more user friendly than Windows95! You have more freedom and choice in Linux desktops as compared to Windows 9X/NT.
➢ Linux OS needs only 200 MB of disk space for installation. Linux supports dual boot on the PCs - that is, you can have Windows95/NT on one partition and Linux on other. During system startup user can select to load Linux or Windows 95 and vice versa. Nowadays PCs are shipped with 6 Gigs of disk space.
➢ Linux runs on many hardware platforms - Intel, Motorola, PowerPC, RISC, DEC Alpha, MIPS, ARM, Transmeta Crusoe, Sparc architectures and GNU Freedom-64-bit CPU. Linux is already ported to 1024 CPUs super computer (Fujistu, Hitachi, Sun, Intel & others). Intel corporation had built the world's fastest super-computer with 10240 Intel Pentium CPU’s (more than ten thousand CPU’s) which is based on a system similar to Linux.
➢ Linux is 100% POSIX compliant OS, whereas Windows NT/9X are not. POSIX is IEEE (Institute of Electrical Engg) standard as well as ANSI and international ISO standard spec. U.S. govt generally require full compliance of POSIX on any operating system. Most of the Unix's like Solaris, HPUX, AIX, SCO are 100% POSIX
➢ We can get the complete source code for Linux OS and all of its applications, whereas Windows 9X/NT is proprietary and we get only the binaries. Having the source code of Linux is vital for companies because they can quickly add advanced features and share it with every other company in the world.
➢ Linux is free of any cost. Downsides of Windows 9X/ NT is that we need to pay $200 (US dollars) per seat for Windows 95 and $800 (US dollars) per seat for Windows NT. And Microsoft applications like MS Office, C++ compilers and others will cost further $400,000 US dollars. It is better to spend money on hardware and use Linux as the software.
➢ Linux is trouble free and we will not have any problems with Linux, whereas you will have more headaches with Windows 95/NT (MS is not as reliable as Linux).
➢ Linux more than 1900 software packages on cdrom and many more are being developed world-wide. All the software packages are in a single Linux cdrom.
➢ Linux was awarded “The best Network Operating system 1997/98/99/2000”, by many computer magazines’ (US InfoWorld, European publications).
➢ The movie Titanic was created using Linux on Digital Alpha. Linux was used to create computer graphics, animations of all the shots in the movie Titanic.
➢ Linux was also used for storing data from experiments in the space shuttle. Linux was orbiting the earth in space.
1 Advantages of Linux:-
|Virus proof |Advanced OS |Crash proof |
|Economical |Secured |User friendly GUI |
|Multi-user |Multi-tasking |Multi-desktop |
|Powerful networking |Variety of servers | |
2
3 Who are using Linux:-
| Private sector | Government sector |
| Raymond’s | Air-India |
| ICICI | Central Excise |
| IDBI | Govt. of MP |
| Bombay Dyeing | Govt. of Goa |
| Asian Paints | Govt. of Kerala |
| Bharat petroleum | Govt. of A P etc. |
| Reliance | Railways |
LINUX INSTALLATION
Before Linux installation, you must really know about what is hard drive partition. For Linux installation we need to insert the installation cd of Red Hat Linux to CDROM and boot. Most of the installers give you an option between text and graphical install; you need to select “text” if your computer memory is restricted.
Linux software comes in packages. No matter what distribution or version of Linux you have, the CD contains packages that make the base operating system a rich selection of networking “clients” and “servers” with appropriate configuration and monitoring tools, some end-user text mode application, base X-window system and at least one GUI desktop.
The installation program will ask you several things to do like type of boot loader configuration. It is better to select GRUB boot loader configuration. After this you will be asked to select the type of doing partitions. It is recommended to choose disk druid type. In this you will be asked to do partitions on available free space. In Linux there is all file system concept unlike windows. The minimum required file system for installation of Linux are /, /boot, swap and /usr. After doing these partitions the procedure will ask which packages to install. If you select “workstation” the packages normally found on servers are omitted from your installation. If you select server installation then the end-user applications will not be installed. You can also chose to install “everything”, best option for installation on personal computers at your home for new users. For expertise users there is an option of selecting individual packages as per your requirement. Now installation of Linux all in the form of packages starts and takes time according to the packages selected. After completion the system reboots and Linux will start successfully.
Types of installation Method
✓ CD-ROM
✓ NFS
✓ FTP
✓ HTTP
✓ HARD DISK
✓ Through kickstart method
Types of Bootloader
✓ GRUB
✓ LILO
Hard Disk Partitioning Method
✓ Disk druid
✓ fdisk
Type of X-Window System (Desktop)
✓ GNOME – GNU Network Object Model Environment
✓ KDE- K Desktop Environment
LINUX KERNEL & SHELL
KERNEL
The core of the Linux system is the kernel-the operating system program. The kernel controls the resources of the computer, allotting them to different users and tasks. It interacts directly with the hardware, thus making the programs easy to write and portable across different platform of hardware. Since the kernel communicates directly with the hardware, the parts of the kernel must be customized to the hardware features of each system. However, the kernel does not deal directly with a user. Instead, the login process starts up a separate, interactive program, called the shell, for each user.
SHELL
Linux has a simple user interface called the shell that has the power to provide the services that a user wants. It protects the user from having to know the intricate hardware details.
Feature of Shell:
❖ Command Execution
❖ Redirection
❖ Background processing
❖ History
❖ Aliases
❖ Variables
❖ File Name Expansion
❖ Command completion
Types of Shell in Linux:
➢ Bash- “Bourne Again Shell”
➢ Pdksh-“Public Domain Korn Shell”
➢ Tcsh- “Tom’s C Shell”
➢ Ash- “A Shell”
➢ Zsh- “ Z Shell”
Linux Utilities and Application Program
The Linux utilities or commands are a collection of programs that service day-to-day processing requirements. These programs are invoked through the shell, which is itself another utility
LINUX FILE SYSTEMS
MS-DOS, VFAT, and UMSDOS:-These filesystems allow you to read MS-DOS-formatted filesystems. MS-DOS lets you read pre–Windows 95 partitions, or regular Windows partitions within the limits of short filenames. VFAT lets you read Windows 95 and later partitions that are formatted to this filesystem. UMSDOS allows you to run Linux from a DOS partition (not currently supported by Red Hat).
ISO 9660 CDROM: - The standard filesystem for CD-ROMs. It is also known as the High Sierra File System or HSFS on other UNIX systems.
Minix:-The standard filesystem for the Minix operating system. This is the original default Linux filesystem. The current Linux standard is ext3.
NTFS:- NTFS is the Microsoft Windows NT/2000/XP filesystem designed for username / password security. Currently supported as a read-only system.
OS/2 HPFS: - The standard for IBM’s OS/2 operating system.
/proc: - The /proc filesystem is a Linux virtual filesystem. Virtual means that it doesn’t occupy real disk space. Instead, files are created as needed. /proc is used to provide information on kernel configuration and device status.
/dev/pts: - The /dev/pts filesystem is the Linux implementation of the Open Group’s Unix98 PTY support.
ROM:-The ROM filesystem is a read-only filesystem, intended primarily for initial RAM disks such as an installation boot floppy.
Second Extended (ext2):-The basis for ext3, the standard Linux filesystem. The ext3 filesystem is essentially ext2 with journaling.
Third Extended (ext3):- The standard Linux filesystem.
NFS:-The Network File System. This is the system most commonly used to share files and printers between Linux and UNIX computers.
SMB: - Server Message Block (SMB) is based on Microsoft and IBM network protocols. Linux can use SMB to share files and printers with Microsoft Windows operating systems.
NCP: - Netware Core Protocol (NCP) is the network filesystem used by Novell, using the IPX/SPX protocol stack. NCP allows Linux to use NCP as a client Types.
Filesystem
In all of the preceding configurations, automatic partitioning sets up multiple volumes—separate volumes on each directory. The advantage of separate partitions for certain directories is that it limits the risks to your system. For example, many Webmasters configure their Web sites to write daily log files with data relating to all users who visit their sites. These files can become quite large, especially for large online merchants. Before you decide how to set up partitions, you need to know about each of the major Linux directories. Linux directories are organized according to something known as the Filesystem Hierarchy Standard (FHS).
Filesystem Hierarchy Standard
The FHS is a standard for organizing directories for Linux- and Unix-based systems. Every FHS-compliant operating system starts with a top directory, root, symbolized by the forward slash. All other directories are subdirectories of root.
|Directory |Description |
|/ |The root directory. Other directories are below root in the FHS hierarchy. Unless mounted separately, the contents of |
| |other directories are in the root directory partition. |
|/bin |Essential command line commands. Do not mount this directory on a separate volume, or else you may not be able to find |
| |these commands when you use a rescue disk. |
|/boot |Linux startup programs. Normally includes the Linux kernel. Separate/boot partitions are common; the default size is |
| |currently 100MB. |
|/dev |Linux device drivers. Do not mount this directory on a separate partition. /etc Basic configuration files. |
|/home |User home directories (except the root user). |
|/lib |Program libraries. Do not mount this directory on a separate partition. |
|/mnt |Mount point for removable media (floppy disks, CD drives). |
|/opt |For applications, such as StarOffice or VMWare. |
|/proc |Running kernel processes. |
|/root |Home directory for the root user. Do not mount this directory separately. |
|/sbin |System administration commands. Do not mount this directory separately. |
|/tmp |Temporary file default directory. |
|/usr |Small programs. |
|/var |Log files, print spools, and other variable-sized data. |
|/etc |All configurations files. |
X WINDOW SYSTEM
➢ Provides foundation for the graphical component of Linux.
➢ Created in 1986.
➢ Client / Server Architecture.
➢ XFree86 – Free Open Source implementation of X.
➢ Flexibility of the core components
• Use fonts on local or remote machine.
• Different graphical login-gdm,kdm,xdm
➢ KDE – KDE is the k Desktop Environment. It consistent desktop environment. It uses Qt widget set.
➢ GNOME – Consistent easy to use desktop environment. GNOME has collection of tools and libraries to develop software. It uses GTK+ widget set.
➢ Web Browsers
• Mozilla- Standard web browser.
• Lynx – Original text mode browser.
• Links – Advanced text mode browser.
• Konqueror – KDE file manager/web browser.
➢ Mail Clients
• Mozilla mail
• Kmail - KDE mail client
➢ Office Application –
• KOffice- Integrated office suite for KDE.
• Open office – open source version of staroffice.
➢ GUI Editors –
• Xemacs – X version of emacs editor.
• Kwrite – Default KDE text editor.
➢ Redhat-config-xfree86
• Red hat developed X configuration tool
• Monitor selection
• Resolution selection
• Video card selection
➢ Xchat – Full-featured IRC client
➢ gftp – Graphical ftp client.
➢ gimp – The GNU image Manipulation Program.
➢ Window Manager – Special X client. Perform window movement, resizing, focus.
LINUX NETWORKING
For networking firstly your hardware must be properly configured. Your network card should have been setup during the Linux installation or after the installation. Under Linux most drivers for network cards are implemented as modules, after the module is inserted, you may want to inspect the file /proc /modules to see if the module is loaded. The module configuration file is modules.conf in /etc. After setting up the network and connecting the cables, set up the network by running the command: - netconfig
While setting up the network, doesn’t mess up with the “loop back driver” which has the IP address 127.0.0.1. It is always there-it is the IP through which the computer talks to itself. IP address is allocated either statically or dynamically.
For Linux Networking (communication through a network), the two basic Requirements are Media and Rules:-
1. By media we mean the communication link (cables), hubs and switches. It may be wired or wireless. Hubs are dumb, not an intelligent device. It works at the Physical layer whereas Switches are intelligent devices and works at Data link layer. To obtain good performance we make use of Switches. In a Switch, direct routing is possible, the data packet is unicasted and not broadcasted, the packet doesn’t traverse to all the port but direct connection is made via IP address. Thus it has high performance; Switches maintain the IP address table for mapping process.
2. By rules we mean the set of protocols used for communication. Rules or the Protocol to be used depends on the OS on the end systems, if both the end- Systems have MS-Windows then for small network we use Netbui protocol & for larger networks use of TCP/IP is made. End systems having LINUX as OS Make use of TCP/IP protocol.
Some Basic Networking Command
1) Ping – Measures connectivity and network latency between local & remote system. It uses ICMP echo packets.
Example: ping 192.168.0.1
Or ping
2) traceroute – Shows network path between local and remote systems. Useful for pinpointing network congestion.
Example: traceroute
3) netstat – Lists network statistics and parameters, including Network Connection, Routing table, Interface statistics.
Example: netstat –rn
Or netstat –a
4) ifup/ifdown - For each installed network adapter, there is a Corresponding ifcfg-* file in/etc/sysconfig/network Scripts. You can activate or deactivate that adapter with the ifup and ifdown commands. Either one of the following commands will activate the eth0 network adapter:
Example: ifup ifcfg-eth0
ifup eth0
5) ifconfig - The ifconfig command is used to configure and display network devices. Here is some sample output of an ifconfig command:
# /sbin/ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:50:56:40:1E:6A
inet addr:192.168.199.131 Bcast:192.168.199.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11253 errors:0 dropped:0 overruns:0 frame:0
TX packets:1304 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:2092656 (1.9 Mb) TX bytes:161329 (157.5 Kb)
Interrupt:10 Base address:0x10a0
# /sbin/ifconfig eth0 207.174.142.142
The first parameter, eth0, tells us which interface is being configured. The next argument, 207.174.142.142, indicates the new IP address being assigned to this interface. If we want to make sure our change worked, we issue the ifconfig command again to view its current settings.
# /sbin/ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:50:56:40:1E:6A
inet addr: 207.174.142.142 Bcast:192.168.199.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11253 errors:0 dropped:0 overruns:0 frame:0
TX packets:1304 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:2092656 (1.9 Mb) TX bytes:161329 (157.5 Kb)
Interrupt:10 Base address:0x10a0
DNS SERVER
DNS is the Domain Name System, which maintains a database that can help your computer translate domain names such as to IP addresses such as 216.148.218.197. As individual DNS servers are not large enough to keep a database for the entire Internet, they can refer requests to other DNS servers. This section addresses two basic DNS server configurations: a caching-only server, and a primary DNS server for a domain. The key configuration files to support such servers include /etc/nsswitch.conf, /etc/resolv.conf, and /etc/hosts,/etc/named.conf,/var/named/.
Types of DNS server
1) Master DNS Server- contains the master copy of data for a zone.
2) Slave DNS Server – provides an automatic backup to the master name server.
3) Caching-only Server - When a request is make for a Web page such
as, network asks the configured DNS server for
the associated IP address. This is usually known as a name
query. If the DNS server is outside your network, this request can take
time. If you have a caching-only name server, these queries are stored
locally, which can save significant time while you or others on your
network are browsing the same sites on the Internet.
Service Profile: DNS
• Type: System V-launched daemon
• Packages: bind,bind-utils
• Daemons: named
• Script: named
• Ports: 53 udp, 53 tcp
• Configs: /etc/named.conf,/var/named/*
• Related: redhat-config-bind
Domain Name System
DNS root
com net us jp Top-level domain
second-level domain
omoini.ny.us
fox.trot. omoini.ny.us
The DNS root has a small set of top-level domains that rarely changes. Some of them are as aero, com, net, edu, gov, info, org, int, and name. In a domain name like , net is a first-level name within the root, example is a second-level name within net, and www is a third-level name within example. The domain contains another third-level domain called fox.trot. The tree can extend to any number of levels, but in generally it is not more then four levels deep.
DHCP SERVER
DHCP provides methods for hosts on a TCP/IP network to request and be granted IP addresses, and also to discover information about their local network. One machine on an Ethernet segment is designated the dhcp server and configured to answer these requests.IP addresses are either dynamically assigned from a range or pool of address, or statically assigned by MAC address.
Service Profile: DHCP
• Type: System V-launched scripts
• Packages: dhcp
• Daemons: dhcpd
• Scripts: dhcpd
• Ports: 67(bootps),68(bootps)
• Configuration: /etc/dhcpd.conf
• Related: dhclient
Example: Dhcp server provides ip address between 192.168.0.1/192.168.0.20
192.168.0.1
[pic]DHCP SERVER
SWITCH
[pic] [pic] [pic]
PC 1 PC 2 PC 3
192.168.0.18 192.168.0.19 192.168.0.20
DHCP SERVER PROVIDE IP ADDRESS DYNAMICALLY
LINUX AS ROUTER
For a Linux machine to be called a router it has to either have at least two network cards or it should have IP aliases set up.
The steps are as follows:
▪ Configure the network cards
▪ Run the netconf command
▪ Select the Routing & Gateway option
▪ Provide the required IP address
▪ Select Enable Routing option.
▪ Accept the configuration
▪ Restart the network service
CLASS A [pic]10.0.0.2 [pic]10.0.0.3
NETWORK
Switch 1 eth0 10.0.0.1
[pic]
eth1 192.168.0.1
Switch 2
CLASS C NETWORK
[pic] [pic]
192.168.0.2 192.168.0.3
Fig: LINUX AS ROUTER
LINUX AS FIREWALL
A Firewall is quite simply a TCP/IP host on the internet, with multiple IP interfaces or network cards. One interface is connected to the internet, and other is connected to the internal network.
Firewalls are intended to keep the flames of internet hell out of your private LAN, or, to keep the members of your LAN pure and chaste, by denying those accesses to all the evil internet temptations.
Types of Firewall
1) Packet filter:- Screening Router
• Filters Ip packets
• Route between networks
• Protocol independent
• Only filters packet header
• Minimal hardware needs
• Work on transport layer
2) Dual-homed host:- proxy
• Filters protocols
• No routing between networks
• Not all protocols supported
• Can filter content
• High hardware requirements
• Work on application layer
Iptables & netfilter
Netfilter is Linux 2.4’s network filter stack. The filtering stack was redesigned to have packet filtering, mangling and network address translation in one implementation. Iptables is netfilter’s filtering module.
Iptables now uses different tables for different action. Generally filter and nat tables are used. There are five built-in chains (INPUT, OUTPUT,
FORWARD, PREROUTING AND POSTROUTING).The chains represent special hooks in the netfilter code that are used for the packet filtering.
Iptables syntax and commands
▪ Iptables [-t table] [pattern] [-j target]
Here action determines the action to perform on the table.
Here pattern specifies when the rule matches.
Target defines what happens to the packet.
▪ Iptables –t filter –A INPUT –s 192.168.0.254 –j DROP
This deny the any packet arriving from IP address 192.168.0.254
▪ Iptables –t filter –A OUTPUT –d !192.168.0.254 –j DROP
This denies all packets to every host except 192.168.0.254
▪ Iptables –t filter –A INPUT –s 192.168.0.251 –I eth3 –j DROP
This rule denies all packets from 192.168.0.251 coming in to the eth3 interface.
▪ Iptables –t filter –L INPUT
This rule is used to list the rules in a particular chain.
▪ Iptables –F
For freshens Iptables.
APACHE WEB SERVER
➢ Apache is RedHat’s standard web server.
➢ Apache is the most widely used web server. More then 60% sites are hosted on apache web server.
➢ Apache provides very stable and scalable web server platform.
➢ Apache support virtual hosts in which multiple web sites may share the same web server.
Service profile: Apache
• Type : System V-launched service
• Packages: httpd
• Daemons : httpd
• Script : httpd
• Ports : 80/tcp (http) , 443/tcp (https)
• Configuration : /etc/httpd/* , /var/www/*
Installing the Apache Server
1. Mount the Red Hat RPM source files for Apache. They may be located on
CD or you may have copied them in a previous chapter to a network source.
2. Locate the Apache RPM packages: httpd, httpd-devel, redhat-config- httpd, mod_python, autoconf, automake, libtool, mod_perl, and mod_ssl. If you can’t find some of these packages; you may have to repeat steps 1–3 with a different Red Hat Installation CD.
3. Load the Apache RPM packages.
4. Use chkconfig to verify that Apache is not configured to start.
5. Now, use chkconfig to start Apache for runlevels 3 and 5.
6. Start Apache by hand by invoking the Apache management script (httpd)
in /etc/rc.d/init.d.
7. Start a Web browser such as Mozilla or Konqueror. Point it at . You should see the default Apache Web page for Red Hat Linux.
8. Close your Web browser.
Network File System (NFS)
NFS is the standard for sharing files and printers on a directory with Linux and UNIX computers. It was originally developed by Sun Microsystems in the mid-1980s. Linux has supported NFS (both as a client and a server) for years, and NFS continues to be popular in organizations with UNIX- or Linux-based networks.
Required Packages
Two RPM packages are associated with NFS: portmap and nfs-utils. Use the rpm –q packagename command to check for these packages, which should provide a number of key files. The nfs-utils package includes:
o /etc/rc.d/init.d/nfs (start/stop script for NFS)
o /etc/rc.d/init.d/nfslock (start/stop script for lockd and statd)
o ¦/usr/share/doc/nfs-utils-version (documentation, mostly in HTML format)
o Server daemons in /usr/sbin: rpc.mountd, rpc.nfsd
o ¦Server daemons in /sbin: rpc.lockd, rpc.statd
o Control programs in /usr/sbin: exportfs, nfsstat, nhfsstone, showmount
o Status files in /var/lib/nfs: etab, rmtab, statd/state, xtab
The portmap package includes the following key files:
o /etc/rc.d/init.d/portmap (start/stop script)
o /usr/share/doc/portmap-version (documentation)
o Server daemon in /sbin: portmap
o Control programs in /usr/sbin: pmap_dump, pmap_set
Service Profile: NFS
• Type : System V-launched service
• Packages : nfs-utils
• Daemons : nfsd, lockd ,rpciod , rpc.{mountd,rquotad,statd}
• Scripts : nfs , nfslock
• Ports : assigned by portmap (111)
• Configuration : /etc/exports
NFS Server & client
NFS SERVER
(LINUX)
SWITCH
[pic] [pic]
NFS CLIENT 1 NFS CLIENT 2
(LINUX) (UNIX)
Samba Server
Microsoft computers can share files and printers on a network through a facility called SMB, Server Message Block. This type of network communication over a Microsoft-based network is also known as NetBIOS over TCP/IP. Through the collective works of Andrew Tridgell and many others (in the Samba group), Linux systems provide transparent and reliable SMB support overTCP/IP via a package known as Samba.
You can do four basic things with Samba:
➢ Share a Linux directory tree with Windows computers.
➢ Share a Windows directory with Linux computers.
➢ Share a Linux printer with Windows computers.
➢ Share a Windows printer with Linux computers.
It is easy to configure Samba to do a number of things on a Microsoft based network:
➢ ¦Participate in a Microsoft Windows 9x–style Workgroup or an NT/2000/XP Domain as a client or a server.
➢ Act as a Primary or Backup Domain Controller.
➢ Share user home directories.
➢ Act as a WINS client or server.
➢ Link to or manage a workgroup browse service.
➢ Act as a Master Browser.
➢ Provide user/password and share security databases locally, from another Samba server, or from a Microsoft Domain Controller.
➢ Configure local directories as shared SMB filesystems.
➢ Synchronize passwords between Windows and Linux systems.
➢ Download print drivers to Microsoft clients.
These are the four Samba RPM packages that you need:
➢ The Samba package includes the basic SMB server software for sharing files and printers.
➢ The Samba-common package contains common Samba configuration files.
➢ The Samba-client package provides the utilities needed to connect to shares from Microsoft computers.
➢ The Samba-swat package includes the aforementioned SWAT configuration tool.
Service Profile : Samba
Type : System V-launched service
▪ Package : samba, samba-common, samba-client
▪ Daemons : nmbd ,smbd
▪ Script : smb
▪ Ports : 137,138,139
▪ Configuration : /etc/samba/smb.conf
▪ Related : samba-swat
SAMBA SERVER (LINUX)
PRINTER
SWITCH
LINUX WINDOW 98 WINDOW 2000 SERVER
SAMBA CLIENTS
Fig: SAMBA SERVER SHAREING PRINTER,FILE & DIRECTORY
Network Designing & Implementation (Local Area Network):-
|Hardware Requirement For Red Hat Linux Network Installation |
| Pentium base Server with 64 MB RAM |
| Hard disc drive of minimum 4.3 GB |
| Ethernet Card (NIC) 10/100 MBPS 10 Nos |
| Ethernet Hub 10/100 MBPS 12 Port 01 Nos |
| UTP CAT 5e Cable 500 Meter (Approx) |
| RJ-45 Connector 30 Nos |
|Software & Operating System |
| Red Hat Linux 8.0 Professional Server 01 Nos |
|Client Operating System 20 Nos |
|Network Installation & Implementation |
| Red Hat Linux 8.0 Professional installation and Configuration (LAN/WAN) |
NETWORK SETUP FOR ISP USING LINUX AS OS
|[pic] |
Fig: Diagram for Network Setup for ISP
Linux Networking, for communication through a network the two basic requirements are the Media and Rules, by media we mean the communication link (cables), hubs and switches. Media may be wired or wireless, by rules we mean the set protocols used for communication. Hubs are dumb and not an intelligent device, it works at the Physical layer whereas Switches are intelligent devices and works at Data link layer. To obtain good performance we make use of Switches. In a Switch direct routing is possible, the data packet is unicasted and not broadcasted, the packet doesn’t traverse to all the port but direct connection is made via IP address.
Thus it have high performance, Switches maintain the IP address table for mapping process.
Rules or the protocol to be used depends on the OS on the end systems, if both the end systems have MS-Windows then for small n/w we use Netbui protocol and for larger networks use of TCP/IP is made. End systems having LINUX Operating System make use of TCP/IP protocol.
In the ISP Network diagram we can see a PRI line, it is a telephone line from BSNL taken by the ISP, PRI stands for primary rate interface, it contains 32 channels out of which 2 are reserved for signaling and the rest are to used for connection of the user with the ISP. One PRI line can server 30 users at a time. Other than PRI line the ISP requires a certain bandwidth for getting connected to the internet & this bandwidth is provided by the providers as Escotel, net4india, TATA, BSNL etc.
LLM, lease Line Modem, it is the hardware required to use the provided bandwidth. Radius Server is the server used for billing and accounting of the users. The user authentication is also checked by this server only. Squid Proxy Server is the LINUX based server & is used for internal networking.
RAS-Remote Access Server helps in connection establishment & provides a free port to the user to get connected to the ISP.
The user dials up and the call goes to the PSTN which is routed to the RAS to which the user is connected to the free port. The user is then authenticated via the Radius Server. The DHCP gives a dummy IP address to the user and all the other servers are provided with the fixed real IP addresses. The request from the user goes to the DNS which contain information of other server & DNS, the user access the request using router with address from DNS.
| |
| |
| |
| |
| |
| |
| |
|Router |
|[pic] |
| |
|Switch |
| |
| |
| |
| |
|[pic] [pic] [pic] |
|IBM Server Compaq Server HCL Squid Proxy |
|Server |
Fig: Network Diagram for Server Room of CTD
Squid Proxy Server: - Squid is a high –performance proxy caching server for Web Clients, Supporting FTP, Gopher and HTTP data objects. Unlike traditional caching software, Squid handles all requests in a single, on blocking, I/O driven process. Squid keeps meta data and especially hot objects cached in RAM, Caches DNS lookups and implements negative caching of failed requests. Squid consists of a main server program squid, a Domain Name System lookup program, a program for retrieving FTP data and management and client tools.
|1. I B M Server |
| Operating System: Windows 2000 Server, Running FTP Server |
|2. Compaq Server |
| Operating System: Redhat Linux 8.0 Professional Server |
| Installation and Configuration of Redhat Linux 8.0 |
| Configuration of Firewall |
| Installation and Configuration of DNS Server |
| Installation & Configuration of Mail Server-mail, Linux base Mailing soln’s |
| Installation and Configuration of Apache Web Server |
| Configuring FTP Server & Telnet Services |
|3. HCL Squid Proxy Server |
| Operating System : Redhat Linux 8.0 Professional Server |
| Installation and Configuration of Redhat Linux 8.0 Professional |
| Installation and Configuration of Squid Proxy Server |
BIBLIOGRAPHY
1. Red Hat Linux Essentials RH033.
2. Red Hat Linux System Administration RH133
3. Red Hat Linux Networking and Security Administration RH253.
Provided by REDHAT Corporation.
4. Redhat Linux 9.0 Unleased
5. Redhat Linux 9.0 Bible
[pic]
-----------------------
Internet
Cloud
WEB SERVER
MAIL SERVER
PRI
LINE
Node- PC
Internal Networking
SQUID
PROXY
SERVER
RADIUS SERVER
INTERNET
ROUTER
LLM
DHCP
DNS
SWITCH
R
A
S
USER
PSTN
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- acknowledgement for project report school
- acknowledgement for project report college
- acknowledgement for project report format
- science project report format
- science fair project report template
- science project report template
- mba project report pdf
- quarterly project report template
- project report sample
- sample project report format
- sample project report template
- project report out template