Welcome to the Cisco Academy for Vision Impaired Linux Wiki. |
Main /
Lecture13This lecture finished our coverage of DNS, and also covered how to install the Exim mail transport agent. It began with a brief discussion of the importance of backing up information before an operating system upgrade, since things can go wrong. An example is if the power goes out and causes the system not to boot. Backups made with afio have a better possibility of recovery than tar if there are read errors. DNSTo review:
the nslookup utility can be used to display dns records. It is available in Windows and also in Linux if the dnsutils package is installed. There are different record types, including A and MX:
A. Name that points to an IP address. Using the Windows nslookup utility, we ran several queries. set querytype=a set querytype=mx set querytype=ns server servername set type=soa A nonrecursive name server will only answer queries for domains it supports, and a recursive name server will answer queries for any domain. If running a nameserver answering external queries limitted only to things inside your network, recursive queries should only be answered from the internal network to limit external access to information from zone files. Type exit to exit nslookup. EXIM Mail Transport AgentOur discussion of an email server began with some background explanation of mail routing. If there is only 1 mx record for a domain and the server is not available, mail cannot be delivered. It is important to read bounce reports to find out why mail bounced. The MTA used in our course is Exim. Its website is www.exim.org, which contains resources such as a wiki and mailing lists. There are documentation packages available in Ubuntu that provide Exim documentation in HTML and info formats. A large text file with the documentation is also included with the Exim installation. Other MTA's that were not covered here include Postfix, qmail, and Sendmail. A machine which has a mail server installed must have port 25 open externally. Some ISP's block port 25. A mail server set up as an open relay will accept mail from anywhere to anywhere and can be used to send large amounts of junkmail. Ubuntu has light and heavy versions of Exim, with the heavy version containig more features such as database support. The exim4-daemon-heavy package was used for demonstration. Several questions are asked when installing Exim. These provide a starting point for its configuration. Questions include the type of mail routing, domain name and IP address, networks which can relay mail through the server, whether or not to split the configuration into smaller files, and the postmaster email address. The exim configuration contains several sections which can be customized to control how the mail server operates. The netcat tool can e used to do various network tasks. It was used to connect to the mail server after it was installed and send a test email. A program like fetchmail can be used to download mail from an ISP and have it processed by the local mailserver. Aliases can be useful to direct mail to a particular email address, such as the linux-instructors email address being sent to the instructor. If the instructor changes, the email address can remain the same. Miscelaneous topics discussed in study group 13Virtual hosts in ApacheThe virtual host snippet is put into /etc/apache2/sites-available and enabled with a2ensite filename. This process is documented in /usr/share/doc/apache2/README.Debian.gz. Once enabled, run apache2ctl -t to test syntax of configuration and reload the server. How to reset the root password on LinuxBoot the system from a rescue CD like GRML Discussion of Linux installationDifferent install media have different boot sequences. The easiest way to figure out how an install boots and how to get to the boot prompt is by using a virtual machine with JAWS 13's OCR feature. For the Ubuntu server CD: Boot the CD, press enter to select English, which is the default. Press escape to cancel the graphical install, wait about 1 second, and enter to choose ok in the dialog asking if you are sure. Then type linux console=ttS1,9600 PartitioningReasons to separate areas of the system onto different partitions are that they can limit areas to a given size, programs like tar and afio can be told to stay within a file system boundary which may be useful when doing backups, and if one partition fills up it will not cause as much trouble to the whole system. There are different partition configurations that can be used, not just one best method. FirewallsLinux has iptables. Ubuntu has UFW. Rules are created when packages are installed. It can be configured with the ufw command. Be careful when installing packages like shorewall or firestarter, can cause trouble if it breaks your SSH access. Firewalls are discussed further in study group 14. |