Northern Alberta Institute of Technology

To: Ralph Witten, Instructor, English Department
From: Philip Bock, NET2I
Date: Thursday, March 13
Subject: Hosting a domain name on the Linux OS

Contents
•	What is the Domain Name System?
•	Acquiring a Domain Name
•	Name Servers
•	Linux as an Internet server
•	Web, Mail, and FTP server software
•	Conclusion
•	Works Cited
What is the Domain Name System?
The internet is a vast, global data network, connecting computers and networks from around the world to each other. The computers on the internet communicate using a protocol called TCP/IP, which assigns each computer a unique identification number called an IP address, and helps computers exchange data by finding the shortest data path between them (this is called routing). The computer’s only means of identifying each other is through the use of their IP addresses. However, people often find IP addresses difficult to remember and use. This is where the Domain Name System becomes useful.
The Domain Name System, hereafter referred to as the DNS, allows computers to be assigned unique, alphanumeric names, which are much easier to remember than IP addresses. You use the DNS every time you enter the name of a web site you wish to visit. The system accepts the name of a computer system, finds its IP address, and returns the IP to the requesting computer. This process is called resolving a domain.
The DNS is made up of thousands of distributed DNS servers (called nameservers), which are connected to each other in a hierarchy. When a computer needs to resolve a domain name, it starts by sending its request to the local nameserver. The name server will perform a search, starting with the highest level nameserver available, and “crawling” down the hierarchy, asking all the nameservers along the way, to find the IP address of the computer associated with the domain (Kirch). When the nameserver finds this, it returns it to the computer that made the request.
Acquiring a Domain Name
Domain names are managed by the Internet Corporation for Assigned Names and Numbers (ICANN). Rather than register domain names directly, ICANN has a list of accredited registrars, which are commercial organizations that make their living registering domain names for a yearly fee.
If your desired domain name is not yet registered, one of these registrars will register it for you for a fee of anywhere between $8.95 and $50 USD, depending on the registrar and any additional services they offer. This is the easiest, least expensive way to get a domain name.
Alternatively, if you need a domain name that is presently registered by someone else, you can attempt to buy it from them. If they refuse, a registrar called SnapNames.com will, for a fee of $69 USD per year, watch the domain you’re interested in and, if it is allowed to expire by its present registrant, register it for you.
Generally, it’s best to try and pick a name that’s available immediately, and register it.
Name Servers
Once you’ve registered a domain, you’ll need to point it at the servers you will use to host it. In order to do this, you will need a nameserver which is configured for the domain.
There are several options for nameservers. If your organization already has a large network, hosting one or several domain names, you could set up your own nameservers. The software most commonly used to do this on Linux (or any Unix, for that matter) is called BIND, and is freely available from the Internet Software Consortium (Langfeldt). The details of BIND are beyond the scope of this document.
For a smaller organization, or an individual, there are a number of organizations that offer free nameserver service. One of the most popular of these is called Granite Canyon. They allow you to create an account, and administer your domain name through a web interface. However, a certain amount of knowledge of BIND zone record format is required.
Another solution is a non-profit organization called DynDNS.org. For a one-time $30 USD donation, they will provide nameservers for one domain. Their management interface is very simple. In case the internet connection you select for the server (discussed in the next section) will provide a dynamic IP address, it is also possible to install client software on the server that will automatically keep the domain name pointed at the correct IP address when using DynDNS.org.
Linux as an Internet server
Linux is an operating system written by a group of volunteer programmers from all over the world. It is modeled after the Unix operating system. By virtue of this fact, it is especially suited to use for network and internet related applications.
Linux has several advantages over other proprietary operating systems that make it ideal for hosting a domain. It will provide decent performance even on older hardware, and scales well even on high load servers, which receive a lot of traffic. It is very secure, when properly configured. Linux can use many excellent server software packages, most of which are freely available (and often included with the operating system), which will be discussed in the next section.
Linux is freely available in various flavors from organizations called distributors, who take various pieces of free software (free as in freedom of speech, as well as in price), and put them together into a package that can be easily installed and used. For the purposes of this report, I will primarily discuss the Debian distribution, as it is my favorite for servers.
To set up a Linux server to host a domain, you will need an internet connection, and the server hardware. There are a number of options to consider when selecting an internet connection to host a domain on, including speed, cost, and IP addressing (Neufeld). To run a small to medium-traffic Web site, anything from an ADSL or cable connection should suffice. For high-traffic sites, something in the range of a T1 or T3 line might be required. Even faster connections are available, but the requirements of such a network will not be discussed here. Another consideration is the contract of the internet provider. Some lower-bandwidth providers do not encourage the hosting of servers on their networks. I have found, however, that there is often more leeway to these providers than the contracts would suggest.
Any computer in the Pentium II range should suffice for the hardware. Installing and configuring a Linux distribution is beyond the scope of this document, but shouldn't  be too difficult with the aid of the appropriate documentation. There are many online resources that could be of use, the most prominent and comprehensive being the Linux Documentation Project, whose web site is www.tldp.org.
Web, Mail, and FTP server software
There are many excellent software packages that are relevant to domain hosting available for Linux. I will discuss one package from each of the most important categories.
The most popular and likely best all-around web server package is called Apache. It is configurable for nearly every conceivable application, and provides excellent performance. If you're using Debian, the Apache package provided will work quite well out of the box, with minimal configuration. For even more flexibility, consider adding the PHP package for server-side scripting. It's a simple, fast, well integrated scripting language, and it's often used to create web pages with dynamic content.
There are a number of good email servers. Popular ones include the venerable Sendmail, Exim, and the rather new Postfix. All support similar features, and differ mainly in the machinations involved in configuration. Debian defaults to Exim, and it is quite serviceable.
The usual means of creating a web page is to write and test it on the author’s computer, and then upload it to the server using FTP, or File Transfer Protocol. This is usually the simplest step of server configuration, as most distributions include a properly configured FTP server by default. The most important thing is to ensure that anonymous users do not have too many priviledges, or the wrong ones. A simple solution to this problem is to disable anonymous access.
Depending on the requirements of the site to be hosted, there may be other necessary software. Common requirements are MySQL database servers, for database-driven web sites, and telnet or SSH servers, to allow users to log in to the server and manage files from remote locations.
Conclusion
If you need to host a small-to-medium size web site on a domain, it is easily possible to do this yourself with Linux using older, little-used hardware, and any type of broadband internet connection. The advantages include increased flexibility, as you can customize your setup exactly, and potentially lower cost.
Works Cited

Langfeldt, Nicolai. “DNS HOWTO.” The Linux Documentation Project. December 20, 2001
	March 13, 2003 <http://tldp.org/HOWTO/DNS-HOWTO.html>.

Kirch, Olaf and Terry Dawson. “The Linux Network Administrator's Guide, Second Edition.” The Linux Documentation Project. March 2000
	March 13, 2003 <http://tldp.org/LDP/nag2/index.html>.

Neufeld, Christopher. “Setting Up Your New Domain Mini-HOWTO.” The Linux Documentation Project. October 27, 2000
	March 13, 2003 <http://tldp.org/HOWTO/mini/Domain.html>.