Register your product to gain access to bonus material or receive a coupon.
"FreeBSD has been the secret weapon of serious network administrators for many years now and this book should provide a welcome introduction to those who have yet to discover it for themselves."
--Jordan Hubbard, Co-founder, The FreeBSD Project
FreeBSD is the engine that runs on some of today's largest Internet servers, such as Yahoo!, Microsoft's Hotmail, and Walnut Creek. The power, flexibility, and cost effectiveness of FreeBSD make it the preferred server platform of many corporate networks, including networks in which the Windows OS predominates.
The FreeBSD Corporate Networker's Guide provides practical instructions for using FreeBSD to serve a largely Windows corporate network. Written for network managers and administrators, this book shows how FreeBSD and Windows can coexist and interoperate on the same network with few problems, and it reveals how to maximize FreeBSD's many advantages for optimal network performance.
The book contains an overview of FreeBSD serving a Windows network and a step-by-step FreeBSD installation guide. Key network server topics--system administration, Internet connectivity, Web servers, fileserving, printserving, and e-mail--are addressed in depth. You will read about specific topics, such as:
In addition, The FreeBSD Corporate Networker's Guide highlights FreeBSD's many technical advantages, the history and rationale behind its development, and its relationship to Linux. The author's Web site for this book, which includes sample code, working examples, and a Q&A forum, is located at www.freebsd-corp-net-guide.com. The CD that comes with this book contains the base FreeBSD 4.2 operating system for the Intel i386 platform, including installer and bootable CD-ROM support. The disk also contains XFree86 3.3.6 for FreeBSD, and several hundred of the most popular third-party packages for FreeBSD.
Click below for Sample Chapter related to this title:
mittel08.pdf
Preface.
Acknowledgments.
1. FreeBSD Serving Windows Networks.
Tasks of a FreeBSD Server in a Windows Network.
Domain Name System or Dynamic Host Configuration Protocol.
Internet Connectivity, Wide Area Networks, and Dialup.
Web Serving.
File Serving.
Printserving.
Electronic Mail.
Commercial Databases.
FreeBSD versus Windows User Interfaces.
Character-Based Interfaces.
Configuration Files.
File Manipulation, Wildcards, and Special Characters.
Logging In.
The Root Account.
System Permissions and File Ownership.
Text File Differences.
Control Characters and Escape Sequences.
Shells.
Selecting FreeBSD Hardware.
Physical Layout Security.
FreeBSD Installation Media.
Dual Booting Windows NT and FreeBSD.
Internet Protocol Design Viewpoint.
Initial Networking Considerations.
IP Number Range.
Automatic Numbering — DHCP.
Installing the ISC DHCP Server.
Domain Name System.
DNS's Relation to DHCP.
Client DNS Queries.
Server DNS Queries.
WINS versus DNS.
Your DNS Name.
Registries.
The Microsoft Networking Client and SMB.
NetBIOS over TCP/IP.
Server Messaging Blocks.
TCP/IP Services.
E-Mail.
Directory Services.
Web.
FTP.
Dialup.
Internal Organization Subnetting.
Basic Setup of IP Clients.
TCP/IP on DOS.
TCP/IP on OS/2.
TCP/IP on Win3.1.
TCP/IP on WfW3.11.
Win95/98.
WinNT.
Macintosh Operating System.
TCP/IP Windows Network and Application Programs.
Archie.
FTP.
Trivial FTP.
Telnet.
Secure Shell.
Usenet News.
Ping.
Finger.
Nslookup.
whois.
tar.
RSH/RCP.
X -Windows Software.
Other TCP/IP Utilities.
Other References.
Obtaining Installation CDs.
Installing Nonproduction Versions of FreeBSD.
Dual-booting Windows NT and FreeBSD.
Preinstallation.
Step-by-Step Installation.
Basic Installation — Phase 1.
Troubleshooting.
Installation Phase 2.
Installation Phase 3.
Installation Phase 4.
X.
PPP Installation.
Manual PPPD Connection.
Diskless Boot.
FreeBSD Support for UPSs.
Kernel Recompilation.
Special Hard Drive Configuration.
Asynchronous Mounting.
Soft Updates.
Large Inode Counts.
General Troubleshooting.
Note on Tape Installation.
Other References.
Quick Environment Setup.
Shells.
Initial Environment Variables.
Job Control.
Terminal Access.
Hardware Terminal Access.
User Accounts.
Breaking Root.
Migrating Password Files.
Redirection and Piping.
UNIX Equivalents of DOS Commands.
Common User Commands.
Common Superuser Commands.
Manually Compiling Software.
Backups.
Reviewing Daily Logs.
UNIX System Administration Books.
Will You Connect?
How to Choose an Internet Serviced Provider.
What Are We Plugging in To?
Peering Agreements.
Multihoming.
Portable Internet Protocol Addressing.
Where Is the Bandwidth Needed?
Hop Counts.
Where Does the ISP Connect To?
ISPs: Bigger Is Sometimes Better.
Shopper's Checklist.
Security and Firewalling.
Packet Filtering and IPFW.
Cisco Router Setup.
The Security Attitude.
Security Tasks.
Proxy Serving and IP Address Translation.
SOCKS5 Proxies.
HTTP Proxies.
Network Address Translation.
FreeBSD Routers.
Basic Routing.
Routed Packet Movement.
Routing Protocols.
Simple Routing With A PC.
The End-Node Hardware Routing Scenario.
Managing Your Cisco Router.
Internets and Intranets.
Web Server History.
The Apache Web Server.
Apache QuickStart.
External Web Publishing Considerations.
Internal Web Publishing Considerations.
Editors.
Windows Web Publishing Tools.
Minimalist Web Publishing Tools.
VI HTML Tool.
The FreeBSD Filesystem.
Device Files.
Soft Links.
Hard Links.
Samba System Overview.
The SMB and NetBIOS Protocols.
Microsoft Networking Client Installations.
DOS.
Windows 3.1.
Windows for Workgroups 3.11.
Windows 95.
Windows 98.
Windows Millennium.
Windows NT.
The NET Command and Logins under Samba.
Other Microsoft Networking Client Tools.
Network Browsing Issues.
What Is Network Browsing?
What Is NetBIOS Nameserving?
Broadcast Forwarding.
Installing the Samba Software.
Modifying the smb.conf File.
Filesharing from the Samba Server.
DOS and Windows-to-UNIX Permissions.
Running Microsoft Access on Samba.
Encrypted Passwords.
PC Printing History.
Printer Communication Protocols and Hardware.
ASCII Printing Protocol.
Postscript Printing Protocol.
HPPCL Printing Protocol.
Network Printing Basics.
Printservers.
Print Spools.
Setting Up LPR on Windows Clients.
Windows 3.1 and Windows for Workgroups 3.11.
Installation of LPR Client on Windows 95/98.
Installation of LPR Client under Windows NT.
Windows NT Registry Changes.
Printing PostScript and DOS Command Files.
Checking PostScript Printer Capabilities.
Setting Up LPR on FreeBSD.
Creating the Spools.
Additional Spool Capabilities.
Printing to Hardware Print Server Boxes or Remote Print Servers.
Printing Raw UNIX Text with a Filter.
The pr Filter.
Printing PostScript Banner Pages with a Filter.
Printer Accounting.
Microsoft Networking Client Printing with Samba.
Client Access Issues.
Printer Entries in Configuration Files.
Printing between NT Server or NetWare and FreeBSD.
Printing from UNIX.
Managing the UNIX Print Queue.
Viewing the Queue.
Removing Print Jobs.
Advanced Management.
Remote Management.
Advanced Printing Topics.
Ghostscript.
a2ps Filter.
Miscellaneous.
Fundamentals of Microsoft Internet Mail.
Simple Transport.
Return Receipts.
Split Processing.
ASCII and Eight-Bit Character Sets.
Case Sensitivity.
Mail Address Usernames.
Attachments.
Mail Directories under FreeBSD.
Internet Mail Protocols.
SMTP.
POP3.
IMAP.
IMAP versus POP3.
MIME.
UUENCODE.
UUCP.
LDAP.
ph.
whois.
finger.
popassd.
Common Internet Mail AdministrativeTasks.
Windows Internet Mail Client Installation.
MS Internet Mail Clients.
MS Internet Mail Client Gotchas.
Eudora.
Netscape Messenger.
Other Mail Client Programs.
Hard and Soft Returns.
Basic Sendmail Installation on FreeBSD.
The Differences between From, From:, and Reply-To:.
Masquerading.
The Qualcomm POP3 Server.
Status Line.
Changing User Passwords.
Directory Service Usage.
Address Book Replication.
finger.
Installing the Reference LDAP Directory Server.
Installing the Open LDAP Directory Server.
Populating the Database in the LDAP Server.
Setting Up Outlook 98 to Use LDAP.
Setting Up Netscape Messenger to Use LDAP.
Setting Up Eudora with ph to Use LDAP.
Connecting the Mailserver to the Internet.
Circuit and Routing Issues.
NAT Considerations.
Listing the Mailserver in the DNS.
Internic Registration.
Troubleshooting.
Mailing Lists.
Alias Mailing.
Installing The Majordomo Listserver.
Web Mail Interface.
Vacation Autoresponder.
Hylafax.
Popper Bulletin Boards.
History of FreeBSD.
FreeBSD's Relationship to Linux.
Why Use FreeBSD?
Deciding to Use FreeBSD in Production.
Freeness.
Supportability and Liability of Open Source Packages.
What Is FreeBSD Advocacy?
The Role of Hobby Users in Software Development.
The Engine that Drives Development.
The Antitrust Suit against Microsoft.
Backlash against MS Windows.
A Final Word about Open Source Software.
The FreeBSD Corporate Networker's Guide is written for beginning FreeBSD administrators who want to take advantage of the power and cost savings afforded by use of this operating system on their organizations' production network. FreeBSD takes its name from the Berkeley Software Distribution group, where the software originated. As with all network operating systems (NOSs), there is a "learning hump" that the administrator just beginning to work with the NOS must climb.
In keeping with the spirit of freely available Open Source software, this book has operating with the Microsoft (MS) operating system and networking as a primary goal. FreeBSD and Windows can peaceably coexist on the same network without problems. As an administrator you can mix and match FreeBSD and Windows servers and clients as you see fit, as long as you follow good networking practices of using standards-based methods and protocols. It is important that a production network be based on standards as much as possible. Mixing FreeBSD and Windows on the same network is an excellent way to do this.
Newcomers to the UNIX computing paradigm will find it somewhat different than the Windows paradigm. Sometimes it is even more difficult for the administrator experienced in other operating systems (OSs) to pick up UNIX than it is for the raw newcomer. Preconceptions of how an OS works and how best to do things need to be shed. This mind expanding is a very good thing for the information system (IS) professional, even if he or she has no intention of using the material professionally. Some people are so bigoted that they carry on a crusade against the Macintosh and/or OS/2. This trap, more than anything else, blocks progress in the quickly shifting computer industry. Even Microsoft, once the standards' bearer of proprietary computing, has come to realize this. The Web front-end of MS's Hotmail service, for example, runs entirely on FreeBSD (look at the MS Help Wanted postings that require FreeBSD experience for Hotmail administrators).
Chapters 4 through 9 are intended to be taken piecemeal. Do you need a FreeBSD router to connect to the Internet? If so, skip to Chapter 5. Do you need a FreeBSD mailserver? If so, skip to Chapter 9. Although there is some order, in that later topics do build on some material introduced in earlier chapters, the main idea is to concentrate first on the sections for which you have an immediate need.
In addition, the information in the chapters is not intended to be swallowed in one gulp but to be used more as a reference. Ignore the bits that are completely inapplicable to your situation. For example, most people will never need to connect a DOS-bootable disk to a FreeBSD network, but the information is there for the few who do need it.
Chapter 10, Advocacy, contains material that polarized the reviewers. Some loved it, some hated it; nobody lacked an opinion about it. This chapter presents all the reasons to use FreeBSD instead of Windows, and it includes some background information about FreeBSD. If you are an administrator who thinks that both Windows and FreeBSD have their strong points and you want to "marry" the two, you won't find agreement here. My goal is to see FreeBSD replace Windows, not to coexist with it forever. Although advocacy may seem out of place in a technically oriented publication, the truth is that this chapter is the real key to the essence of FreeBSD.
FreeBSD, and other Open Source software products, were not written by people who wanted to make a lot of money, or even any money at all. They are not in any way commercial products, yet they are being used as pillars for commercial enterprises! Without understanding Open Source software, why FreeBSD exists, or what drives it, any good administrator would be concerned about its longevity in the market; no administrator could persuade management to try FreeBSD or have any confidence in it. Thus, an understanding of advocacy is essential to the FreeBSD administrator.
Open Source software, like FreeBSD, generally follows this definition.
Open Source software generally comes with a license applied by its copyright holder. The most important purpose of this license is to establish that the software is indeed Open Source and is not commercial, or pirated. Beyond this, Open Source licenses fall into one of two general categories.
Software that is shipped with the source code and contains a software license that disallows mere use of the software in a commercial environment is not Open Source software. The FreeBSD Project does not use such software in FreeBSD because this practice would place most FreeBSD end users in legal trouble.
In the old days of IBM XT-compatibles, building a fileserver on a PC was impractical as well as unbelievable. The 8088 hardware simply was not powerful enough, and the XT was extremely restricted in internal bandwidth and other resources. Back then, servers were big, powerful computers that sat in a glass house, if the organization had them at all.
As PCs became more powerful and Ethernet networks extended to all desktops, the Intel 80286 chip began to be used in the AT computer. Because these PCs were constructed with 8MB and 16MB of RAM and 300MB ESDI disks, their use as network servers became possible. These early machines were still very weak compared to a real UNIX server of the time, but because they were much cheaper, network operating systems began appearing--for example, NetWare and LanManager based on OS/2. Companies built large networks based entirely around these NOSs; these networks came to be known as PC-LANs since clients and servers were both PC-compatible computers. The primary difference between a PC used as a server and a PC used as a client was that the server was more powerful, with larger disks, more RAM, and a faster central processing unit (CPU). In addition to this, while PCs were becoming powerful enough to be used as servers, the original proprietary server computers also continued to become more powerful.
Today, vendors selling servers can be selling, in effect, souped-up PCs, or proprietary-hardware computers such as Sun Sparcs. In this book, the term PC server is used to designate a server built around a PC computer (e.g., Wintel) rather than a server computer built with proprietary hardware (e.g., Sparc).
The Token Ring, Latticenet, and Arcnet network media types originally had some marketshare, but Ethernet rapidly became the dominant network media. FreeBSD does support fiber distributed data interface (FDDI) network cards, but the Ethernet network standard is assumed in this book because it is what most 10BaseT and 100BaseT networks are made up of.
Over the years, the various Microsoft OSs have developed nicknames, although, according to Microsoft, the proper way to refer to them is to use their full names. This book is not an advertisement for MS products, therefore I do not use spelled-out product names for Windows, such as Windows NT Advanced Server, numerous times in a paragraph. Using full names would not only be very tiring for the reader, but it would also make the text read like Microsoft advertising copy. So, here are the shortened terms that are used:
Normal text in this book is in Times New Roman. Text that is typed into the computer, such as commands, is represented in Courier. Bold Courier indicates computer output. You need to understand that space characters are just as important in command strings as they are in text characters; when typing commands, include the spaces. Special emphasis and keywords are represented in italics. In UNIX, the command interpreter assigns special meanings to double and single quotes. Text that is to be typed into the computer is always exactly what is to be typed, including all forward slashes, backslashes, and/or quote marks.
All URLs in this book are set using underlined Courier (e.g., http://www.freebsd.org). URLs either follow the convention of linking to the root index or linking to the base of the item in question. For example, a Web site may have a separate area for a particular program that is substantively different from the rest of the site, in which case it's apparent that the Webmaster regards the separate area as being apart from the main Web site.
UNIX uses the forward slash (/) as the directory separator in the filesystem, not the backslash (\), as in DOS and Windows. In most cases, I use the fully qualified pathname so that "a file named /foobar is read as a file named "foobar" located in the root directory."
One other formatting convention I use is quad-X. In a command string where input must be substituted, the XXXX mark will appear, as in the following.
passwd root
Changing local password for root.
New password: XXXX
Retype new password: XXXX
passwd: rebuilding the database...
passwd: done
TCP/IP is an open protocol originated by the Internet Engineering Task Force (IETF). This body creates standards through the Request for Comments (RFC) process. In addition to the TCP/IP protocol, RFCs exist for many programs found in UNIX, especially network programs. RFCs are identified by numbers, and this book contains references to specific RFCs. A copy of any RFC can be downloaded from the Internet. Years ago, the master location was ftp://ds.internic.net/rfc. So many books and other publications linked to this machine name, however, that it was shut down. In any case, the Internic is not the network citizen it once was. Today, the master RFC site is http://www.rfc-editor.org/. The most popular primary repository is located at ftp://ftp.isi.edu/in-notes. There is a second repository at http://www.ietf.org/, but its RFC page lists the RFC editor's site as the primary one. It contains mainly text versions along with some PostScript versions. The PostScript versions of the RFCs are better than the text ones because some contain diagrams.
In keeping with the spirit of the FreeBSD operating system, practically all software discussed in this book is free, except for the Windows and DOS operating systems. Where specific needs exist on Windows OSs for which no free software package is available, I have used shareware alternatives, always attempting to use the least expensive shareware possible.
Many commercial software packages that manage UNIX-to-Windows interoperability would probably work just as well or better with FreeBSD and Windows desktops. For TCP/IP clients for Windows in particular, the market could use a $20-per-seat Network File System (NFS) client for Win95/98, although this is becoming a moot issue with the release of Win2K.
In some cases, buying hardware devices may be far cheaper and make more sense for many applications than would running software packages on a PC. You owe it to yourself to investigate these as well. Nothing in this book should be construed as a licensing statement for any specific software package. In the case of shareware and freeware, the licenses in the packages take precedence over any statements in this book. It is the end user's responsibility to make sure that all licensing requirements are properly met.
I mention various computer hardware devices that facilitate use of FreeBSD as a network server. Rest assured that I have not received any of these devices free as promotions from their manufacturers, which would influence my selection as to their suitability for use with the operating system. I have purchased all the hardware mentioned here, or used it at businesses that have employe me, where I used the FreeBSD operating system.
An administrator can use a number of significant recognized sources of information about FreeBSD, including the following.
Usenet is an excellent source of quick information on FreeBSD, but new users should be aware of certain aspects of Usenet and its mailing lists. All users should read the "Netiquette" document in the newsgroup news. newusers before posting. In addition, please keep the following in mind.
From almost the beginning of the computer industry, computer engineers have measured data by bits. A single bit in a computer can be either on or off, represented by decimal 0 or 1. Bits are grouped together into bytes, which are eight bits long. Bytes are grouped into words, then double words, and so on. All of these units are used with the octal (base 8) or the hexadecimal (base 16) numbering system.
People don't think in hexadecimal, however; they think in the decimal system (base 10). So do most engineers in other disciplines. Only software engineers can think in hexadecimal. So, bits and bytes are often converted from their hexadecimal and octal measurements into decimal by adding the powers of two: two to the zeroeth, plus two to the first, plus two to the second, and so on.
Two raised to the tenth is equal to 1,024. Very early on, software engineers decided to make things easier for themselves and began using the International System of Units (SI) designations--kilo, mega, giga, and so on. So, eight bits is a byte, 1,024 bytes is a kilobyte, 1,024 x 1,024 bits is a megabyte, and so on. Soon, the abbreviation KB came to be associated with kilobytes, MB with megabytes, GB with gigabytes, and so on.
When networking became important to the industry, confusion arose, so people began writing Kbt, Mbt, Gbt--kilobits, megabits, and gigabits--to satisfy the networking and telecommunications people. These people use the decimal measurement, generally, and to them 1Mbt means 1,000,000 bits, not 1,048,576 bits (a megabyte).
Everyone was pretty satisfied with the arrangement and things went along well enough until hard drive manufacturers came along. The problem was that generally the more bits a hard drive holds, the more expensive it is. So, to gain marketshare, hard drive manufacturers began to market their products based on the decimal measurement of bytes the drives could hold. Thus, instead of a 100MB hard drive holding 100 x 1,024 bytes, it actually held only 100 x 1,000 bytes. This allowed hard drive manufacturers to advertise a 10MB drive that didn't actually hold 10MB of data from the computer user's point of view.
As long as hard drives were fairly small, every computer user pretty much accepted the fact that a hard drive's usable capacity was somewhat smaller than its advertised capacity. In the 1990s, however, as hard drives became larger and larger, the advertised capacity began to diverge tremendously from the real capacity. The drive manufacturers, being hardware people, began complaining to the umbrella standards organization--the Institute of Electrical and Electronics Engineers (IEEE)--to do something about it.
Things came to a head, so in December of 1998, the IEEE (which the networking TCP/IP community had rejected in favor of IETF over the IP standards wars) decided to get involved. With a coalition of physicists and measurement purists, they persuaded the International Electrotechnical Commission (IEC) to issue a standard for data storage based on the decimal system. The new standard renamed all of the standard terminology used by the computer industry, with the exception of the hard drive manufacturers, into the base 10 terminology.
In this book, I do not use the Revised Data Processing measurements promoted by the IEC. Because this book is about a computer operating system, the classic measurement system used by software engineers is used except when referring to data transmission--the telecommunications people have never used the computer measurement system. Sadly, the IEC justifies its standard by saying that more people don't know that 1K means 1,024 rather than 1,000. Therefore, the technical people should bow to the majority. An explanation of the IEC's views on this is located at http://physics.nist.gov/cuu/Units/binary.html.
I am always interested in comments and questions from readers. I've set up an e-mail address for comments about the book, and I hope to incorporate readers' suggestions into a future edition. Please refrain from sending general FreeBSD questions until you have read the entire book, asked questions on one of the FreeBSD mailing lists, and searched the archives--http://www.freebsd.org. Unfortunately, I don't have the time (or money) to be a full-time, unpaid, technical support person for FreeBSD. Please send any book comments to book@freebsd-corp-net-guide.com. Naturally, the publisher and I have tried to eliminate all typos and errors from the text. However, a book this size undoubtedly contains at least one mistake. I'll post any necessary corrections you send me on a Web site for this book. Check the Addison-Wesley site and see http://www.freebsd-corp-net-guide.com for postproduction information.
No body of case law covers URL linking. I am aware that some people would like to make some sort of global, or at least federal, requirement that anyone linking to a URL first seeks permission from the Web site host. This idea may sound reasonable, but it is not. Because no right to control URL linking exists currently, seeking permission would merely confer a right that never existed to begin with.
In all URLs listed in this book, I have followed any instructions that are posted on the Web site by the Webmaster. However, a Web site that is intentionally made accessible to the public is fundamentally a public venue. If you as a Webmaster do not want others to link to a site that is plainly intended to be public, I respectfully suggest that you examine the definition of public and install IP number block filtering to prevent the general public from viewing the site. I believe that if you place a Web site on the publicly accessible Internet, then people should have the right to link to it, which is exactly the same as their right to visit it. If the Webmaster has placed a directive on the Web site requesting that links to it be made to a particular location, I follow these directives for the URLs in this book.
Because of the fluidity of the Internet, a book that names a significant number of URLs is likely to refer to some sites that have vanished or moved. I apologize for this and I'll try to keep a table of corrected URLs and links available at http://www.freebsd-corp-net-guide.com.