Linux Makes It Easy To Build Your Own Internet Server
At Last, A Use For Your Old 486
By Trevor Marshall
May 10, 1999
For several years I have crunched away on an old 486 box at work, where we have a Cisco router connecting a variety of servers directly to the Internet backbone.
But at home, I now have a cable modem, with my own 24-hour dedicated access to the 'net. And so, a few weeks ago, I decided to begin the process of moving my servers home, taking complete control of their destiny away from the M.I.S. Department at work, who have always made the Internet sound so mysterious and complicated.
What I found was that I could do it all with my one cable modem and my old 486 machine. In addition, the Linux OS functioned as a firewall gateway, letting all the computers on my home network access and browse the Internet simultaneously. I also found Linux had the software to set up a mail server.
These articles will look at issues you will have to solve if you decide to host your own Internet servers on a dedicated domestic line, such as a cable modem or an ADSLrouter. Later in the series, I will also show you how to use an ordinary dial-up line, if that is all you have available.
Your modem sends data to the Internet by using a system of IP Addresses. This is a group of four 8-bit numbers that looks like [192.168.1.40]. Every computer connected to the Internet has a unique IP, although if you are on a dial-in network, your IP address will change every time you dial in and establish a connection. FTP, Mail, IRC chat, and a host of other services has a dedicated 'port' address. For example, your Web browser listens to Port 80, your mail server listens to Port 25, and the Telnet program is on Port 23. A full list of the ports can be found here.
A list of all the IP addresses that are associated with allocated URLs is kept on Internic's root servers. When you ask your browser to go to "byte.com" the Domain Name Server (DNS) of your ISP contacts the Internic root servers and finds out what they know about "byte.com". The response is something like:
Server: c.root-servers.net Address: 184.108.40.206
Authoritative answers can be found from:
byte.com nameserver = CMPWEB-DNS0.WEB.CERF.NET byte.com nameserver = VULCAN.CMP.COM CMPWEB-DNS0.WEB.CERF.NET internet address = 220.127.116.11 VULCAN.CMP.COM internet address = 18.104.22.168
(you can obtain this data manually by using Linux's "nslookup" command)
Your DNS then goes to VULCAN.CMP.COM at [22.214.171.124] and asks that Name server what it knows about "byte.com". It responds
Server: vulcan.cmp.com Address: 126.96.36.199 Name: byte.com Address: 188.8.131.52
So, now your browser requests data from 184.108.40.206:80 to see what "byte.com" has to offer (go on, type the IP into your browser and see what you get).
Your DNS server also caches the IP data for several days, assuming that it can save network bandwidth by retrieving the IP from cache when you come back again tomorrow to look at all the wonderful new things happening here at BYTE.
(Note: DNS actually uses a hierarchical tree search that is a little bit more complex, but it is not essential for you to know this just yet.)
Well, the hardest part of setting up your own Web server is providing the IP lookup capability so that people can find you. When you use an ISP to host your website (for example, my old WELL.COM website at http://www.well.com/~tm/ ) then that ISP looks after all the domain name services for you. But as your own host, you will have to use the Linux program called "named" to maintain your own primary DNS services. I found all sorts of problems with getting my DNS services up and running.
Technically, it was perfectly straightforward. I looked up the Linux HOW-TO tutorials and found one called DNS-HOW-TO that contained step-by-step instructions and a full explanation.
The problem I encountered was that the supplier of my Cable Modem, GTE WorldWind, has hobbled its network specifically to make it difficult to set up Web servers. I had a long but fruitless argument with them about their policy, but then had no choice but to devise a workaround.
You see, some of the suppliers of cable modems and ADSL routers are not interested in supporting techies such as you and me. They see us as potential owners of spam mail servers and sex sites. They are a lot happier having their bandwidth used to download the illegal MP3 files that they happily keep on their news servers than in having you or me explore what the Internet is all about.
So, the first thing you will have to do is to visit your ISP's website and find out if they are "blocking" any of your "ports." In my case, GTE was intercepting port 23 (Telnet) and the DNS ports. But I guess I should be grateful for what they left me -- a high-speed Internet gateway for the HTTP traffic to my website.
If you have full access, then things are easy, and you can start setting up your servers right away. But if the DNS ports are blocked you are going to have to find a friendly DNS operator who is prepared to add your IP to the lists he maintains at his site. There is at least one commercial service that will supply DNS for a fee, and I will check them out and report back in the next article of this series.
What Are We Going To Look At Next?
The topics we are going to go through in detail are:
- Installing multiple Ethernet cards for your gateway -- why and how.
- Apache -- Linux's Web server How to configure multiple named virtual servers on the one IP address (e.g. trevormarshall.com , karenmarshall.com , tnschool.org).
- Mail services, Sendmail and POP 3.
- Setting up your Apache as a secure (encrypted) server.
Please understand that I do not generally have the time to answer questions, and there are technical forums on the newsgroup servers (such as comp.os.linux and linux.redhat).
Trevor Marshall is an engineering management consultant, with interests ranging from RF and Hardware design to Linux internals, Internet infrastructure, MPEG, and Digital Video. He started his career in the '70s, designing the Maplin Electronic Music Synthesizers. When the Microcomputer came along, he got sidetracked into computer software, programming the 2650, 8080, Z80, Z8000, 8048, 8306, 6805, 80x86, and Power PC families. Along the way, he also picked up a little expertise in RF system design, biomedical engineering, and the printing industry. His web site is www.trevormarshall.com. Page 1 of 1
A list of all 75 papers Trevor has published is available at this link.
All information published at this website is (C)Copyright 1995-2003 Trevor G Marshall.
Link to "Trevors View" image Copyright (C) 1999-2003 CMP Media Inc
All rights are expressly reserved. Click to email webmaster