Linux Networking Clearly Explained This Page Intentionally Left Blank Linux Networking Clearly Explained Bryan Pfaffenberger University of Virginia Morgan Kaufmann AN IMPRINT OF ACADEMIC PRESS A HARCOURT SCIENCE AND TECHNOLOGY COMPANY San Diego San Francisco New York Boston London Sydney Tokyo This book is printed on acid-free paper ∞ Copyright © 2001 by Academic Press All rights reserved No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopy, recording, or any information storage and retrieval system, without permission in writing from the publisher Requests for permission to make copies of any part of the work should be mailed to: Permissions Department, Harcourt, Inc 6277 Sea Harbor Drive, Orlando, Florida, 32887-6777 Morgan Kaufmann 340 Pine Street, Sixth Floor, San Francisco, CA 94101-3205, USA http://www.mkp.com Academic Press A Harcourt Science & Technology Company 525 B Street, Suite 1900, San Diego, CA 92101-4495, USA http://www.academicpress.com Academic Press Harcourt Place, 32 Jamestown Road, London, NW1 7BY, UK http://www.academicpress.com Library of Congress Catalog Card Number 00-106073 International Standard Book Number 0-12-533171-1 Printed in the United States of America 01 02 03 04 05 06 IP Contents Part I Connecting to the Internet 1 Creating a Dial-Up Internet Connection What You Will Need Getting the Right Modem Installing Your Modem Checking Your Installation Configuring KPPP Troubleshooting Your Installation Looking Under the Hood References and Further Reading 12 16 18 29 37 41 Using Internet Applications 43 Configuring Netscape Helper Applications Configuring Netscape Messenger for E-Mail and Newsgroups Accessing FTP Sites with File Manager Exploring Additional Internet Applications Looking Under the Hood From Here 45 50 56 58 59 63 v vi Part II CONTENTS Building Your Local Area Network (LAN) 65 Essential Networking Concepts 67 Physical Media Communications Standards (Protocols) Data Routing Technologies Types of Packet-Switching Networks Why Create a Local Area Network (LAN)? How Is the Network Hooked Up? (LAN Topologies) Who Is in Charge? (LAN Network Relationships) How Big Is It? (Small, Medium, and Large LANs) Looking Under the Hood Where Linux Fits In References and Further Reading 67 68 69 71 72 73 74 79 84 89 91 Selecting and Installing Network Hardware 93 Introducing the Ethernet How Ethernets Work Ethernet Hardware Designing Your Ethernet Making Sure Your Hardware Is Linux-Compatible Installing Your Network Card Configuring Module Parameters Looking Under the Hood References and Further Reading 94 97 98 103 106 109 110 113 114 Getting Started with TCP/IP 115 Introducing TCP/IP Understanding Internet Layers Internet Addresses (IP Addresses) Creating a Simple TCP/IP Network Testing Your Network Looking Under the Hood References and Further Reading 116 119 122 126 129 131 136 Understanding User Accounts, Ownership, and Permissions Creating User Accounts for Smooth Networking Understanding File Ownership and Permissions Viewing and Changing Ownership and Permissions 137 138 141 143 CONTENTS vii Looking Under the Hood Recommended Reading Configuring and Using NFS Introducing Network File System (NFS) Preparing to Use NFS Setting Up Exports Mounting Remote Directories Sharing Printers Looking Under the Hood References and Further Reading Configuring and Using Samba Introducing Server Message Blocks (SMB) Introducing Samba Planning Your Samba Strategy Obtaining and Installing Samba Creating Linux Accounts for Windows Users Deciding Whether to Use Encrypted Passwords Setting Up Name Resolution Services Configuring Windows Clients Configuring Samba: An Overview Sharing Windows Resources Mounting Shares Automatically References and Further Reading Configuring and Using AppleTalk Introducing AppleTalk Introducing Netatalk System Configuration Essentials Obtaining Netatalk+asun Configuring Netatalk Launching the Server Connecting to the Server with the Chooser References and Further Reading 152 157 159 160 163 168 170 175 179 181 183 184 190 191 191 193 194 195 197 202 209 210 213 215 217 218 219 220 220 221 222 223 viii Part III CONTENTS Connecting Your LAN to the Internet 225 10 227 Sharing an Internet Connection Obtaining and Installing the Software Your Need Configuring Dialup-on-Demand (diald) Testing the Connection Setting Up the Rest of Your Network Setting Up IP Masquerading Sharing Windows and Macintosh Modems References and Further Reading 11 Sharing High-Speed Connections Finding the Speed You Need Examining High-Speed Connection Options Configuring High-Speed Connections Improving Your Network’s Performance References and Further Reading Part IV 251 252 257 270 275 280 Creating an Intranet 283 12 285 Running and Intranet Web Server Introducing Apache Setting Up Web Pages Examining Apache Options References and Further Reading 13 Creating an Intranet FTP Server Introducing Wu-ftpd Configuring Wu-ftpd Using FTP Clients Looking Under the Hood References and Further Reading Part V 228 229 235 240 242 248 250 286 294 295 300 301 302 303 307 308 310 Managing Your Network 311 14 313 Archiving Your Data Automatically Creating Your Backup Server Backing Up with Tar and Cron: An Overview Archiving Data with Tar Creating a Backup Routine 313 314 315 318 CONTENTS ix Repeating the Full Backup Scheduling Backups with Cron References and Further Reading 15 16 320 320 323 Troubleshooting Your Network 325 Configuration vs Troubleshooting Observe, Theorize, Test Checking Physical Connections Network Slowdowns and Stoppages References and Further Reading 326 326 329 342 346 Securing Your Network Understanding the Risk Has Your Network Been Compromised? Understanding your ISP’s Security Role Securing Your System Securing Your System with IP Chains Looking Under the Hood From Here References and Further Reading Index 347 348 349 359 361 368 377 380 381 383 .. .Linux Networking Clearly Explained This Page Intentionally Left Blank Linux Networking Clearly Explained Bryan Pfaffenberger University of Virginia Morgan Kaufmann... so with Red Hat Linux and derived systems, switch to superuser, open a terminal window, type /etc/rc.d/init.d/inetd restart, and press Enter Safeguard Your Partitions You may want to limit access... of partitions to when you reboot Linux or through a mount command by the root user • noexec Prohibits programs from running in this partition If you have created a partition for /home, it is a