Linux Network Administrator's Guideby Olaf Kirch
Linux, a UNIX-compatible operating system that runs on personal computers, is a pinnacle within the free software movement. It is based on a kernel developed by Finnish student Linus Torvalds and is distributed on the Net or on low-cost disks, along with a complete set of UNIX libraries, popular free software utilities, and traditional layered products like NFS and the X Window System. Linux is sweeping Europe, winning adherents in North America, and generating enthusiasm worldwide.
Part of Linux's appeal is the unstructured and far-flung manner in which it grew. Self-styled hackers from many countries created it. Maintenance and support are distributed in a similar manner. And even its documentation -- from installation instructions through manual pages and full-length guides -- is the product of a volunteer effort, the Linux Documentation Project.
Networking is a fundamental part of Linux. As a stand-alone computer system it is impressive enough, but sooner or later you, the user, are going to want to send someone a file, mount a file system from another computer, read Usenet news, or search the World Wide Web. Whether you want a simple UUCP connection or a full LAN with NFS and NIS, you are going to have to build a network.
One of the most successful books to come from the Linux Documentation Project is the Linux Network Administrator's Guide by Olaf Kirch. It touches on all the essential networking software included with Linux, plus some hardware considerations. Topics include:
- Introduction to TCP/IP
- Configuring network and serial hardware
- Domain Name Service
- Serial line communications using SLIP and PPP
- NIS and NFS
- Taylor UUCP
- Administering electronic mail, including smail and Sendmail+IDA
- Administering Netnews, including C News, NNTP, and several news readers
- Specialized Systems Consultants, Incorporated
- Publication date:
Read an Excerpt
Chapter 9:TCP/IP Firewall
Security is increasingly important for companies and individuals alike. The Internet has provided them with a powerful tool to distribute information about themselves and obtain information from others, but it has also exposed them to dangers that they have previously been exempt from. Computer crime, information theft, and malicious damage are all potential dangers.
An unauthorized and unscrupulous person who gains access to a computer system may guess system passwords or exploit the bugs and idiosyncratic behavior of certain programs to obtain a working account on that machine. Once they are able to log in to the machine, they may have access to information that may be damaging, such as commercially sensitive information like marketing plans, new project details, or customer information databases. Damaging or modifying this type of data can cause severe setbacks to the company.
The safest way to avoid such widespread damage is to prevent unauthorized people from gaining network access to the machine. This is where firewalls come in.
WARNING: Constructing secure firewalls is an art. It involves a good understanding of technology, but equally important, it requires an understanding of the philosophy behind firewall designs. We won't cover everything you need to know in this book; we strongly recommend you do some additional research before trusting any particular firewall design, including any we present here.
There is enough material on firewall configuration and design to fill a whole book, and indeedthere are some good resources that you might like to read to expand your knowledge on the subject. Two of these are:
- Building Internet Firewalls
by D. Chapman and E. Zwicky (O'Reilly). A guide explaining how to design and install firewalls for Unix, Linux, and Windows NT, and how to configure Internet services to work with the firewalls.
- Firewalls and Internet Security
by W. Cheswick and S. Bellovin (Addison Wesley). This book covers the philosophy of firewall design and implementation.
We will focus on the Linux-specific technical issues in this chapter. Later we will present a sample firewall configuration that should serve as a useful starting point in your own configuration, but as with all security-related matters, trust no one. Double check the design, make sure you understand it, and then modify it to suit your requirements. To be safe, be sure.
Methods of Attack
As a network administrator, it is important that you understand the nature of potential attacks on computer security. We'll briefly describe the most important types of attacks so that you can better understand precisely what the Linux IP firewall will protect you against. You should do some additional reading to ensure that you are able to protect your network against other types of attacks. Here are some of the more important methods of attack and ways of protecting yourself against them:
- Unauthorized access
This simply means that people who shouldn't use your computer services are able to connect and use them. For example, people outside your company might try to connect to your company accounting machine or to your NFS server.
There are various ways to avoid this attack by carefully specifying who can gain access through these services. You can prevent network access to all except the intended users.
- Exploitation of known weaknesses in programs
Some programs and network services were not originally designed with strong security in mind and are inherently vulnerable to attack. The BSD remote services (rlogin, rexec, etc.) are an example.
The best way to protect yourself against this type of attack is to disable any vulnerable services or find alternatives. With Open Source, it is sometimes possible to repair the weaknesses in the software.
- Denial of service
Denial of service attacks cause the service or program to cease functioning or prevent others from making use of the service or program. These may be performed at the network layer by sending carefully crafted and malicious datagrams that cause network connections to fail. They may also be performed at the application layer, where carefully crafted application commands are given to a program that cause it to become extremely busy or stop functioning.
Preventing suspicious network traffic from reaching your hosts and preventing suspicious program commands and requests are the best ways of minimizing the risk of a denial of service attack. It's useful to know the details of the attack method, so you should educate yourself about each new attack as it gets publicized.
This type of attack causes a host or application to mimic the actions of another. Typically the attacker pretends to be an innocent host by following IP addresses in network packets. For example, a well-documented exploit of the BSD rlogin service can use this method to mimic a TCP connection from another host by guessing TCP sequence numbers.
To protect against this type of attack, verify the authenticity of datagrams and commands. Prevent datagram routing with invalid source addresses. Introduce unpredictablility into connection control mechanisms, such as TCP sequence numbers and the allocation of dynamic port addresses.
This is the simplest type of attack. A host is configured to "listen" to and capture data not belonging to it. Carefully written eavesdropping programs can take usernames and passwords from user login network connections. Broadcast networks like Ethernet are especially vulnerable to this type of attack.
To protect against this type of threat, avoid use of broadcast network technologies and enforce the use of data encryption.
IP firewalling is very useful in preventing or reducing unauthorized access, network layer denial of service, and IP spoofing attacks. It not very useful in avoiding exploitation of weaknesses in network services or programs and eavesdropping.
What Is a Firewall?
A firewall is a secure and trusted machine that sits between a private network and a public network. The firewall machine is configured with a set of rules that determine which network traffic will be allowed to pass and which will be blocked or refused. In some large organizations, you may even find a firewall located inside their corporate network to segregate sensitive areas of the organization from other employees. Many cases of computer crime occur from within an organization, not just from outside.
The term firewall comes from a device used to protect people from fire. The firewall is a shield of material resistant to fire that is placed between a potential fire and the people it is protecting.
Firewalls can be constructed in quite a variety of ways. The most sophisticated arrangement involves a number of separate machines and is known as a perimeter network. Two machines act as "filters" called chokes to allow only certain types of network traffic to pass, and between these chokes reside network servers such as a mail gateway or a World Wide Web proxy server. This configuration can be very safe and easily allows quite a great range of control over who can connect both from the inside to the outside, and from the outside to the inside. This sort of configuration might be used by large organizations.
Typically though, firewalls are single machines that serve all of these functions. These are a little less secure, because if there is some weakness in the firewall machine itself that allows people to gain access to it, the whole network security has been breached. Nevertheless, these types of firewalls are cheaper and easier to manage than the more sophisticated arrangement just described. Figure 9.1 illustrates the two most common firewall configurations....
Meet the Author
Terry Dawson is an amateur radio operator and long time Linux enthusiast. He is the author of a number of network related HOWTO documents for the Linux Documentation Project and is an active participant in a number of other Linux projects.
Terry has 15 years professional experience in telecommunications and is currently engaged in network management research in the Telstra Research Laboratories. Terry lives in Sydney with his wife Maggie, and son Jack.
Olaf Kirch has a degree in Mathematics but turned his back on category theory and compact continuous lattices after booting his first Linux kernel some time in 92. He vividly recalls the joy of learning Unix by reading Linux kernel code.
Since that time, he has participated in various Linux projects, including writing large parts of its NFS implementation, and running the first Linux security mailing list with Jeff Uphoff in 95.
He currently works for Caldera Systems, where he is responsible for much of the network related stuff as well as security issues, and sometimes finds himself wondering whether he's dreaming or if all this is real.
In his spare time, he enjoys being with Maren and their daughter Jule. And in case you actually read the bio in the first edition of the Network Administrator's Guide, Olaf does have a driving license now.
Most Helpful Customer Reviews
See all customer reviews