Cover image for Red hat linux internet server
Title:
Red hat linux internet server
Personal Author:
Publication Information:
Indianapolis, Ind. : Wiley Publishing, 2003
ISBN:
9780764547881
Added Author:

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010048112 QA76.76.O63 S46 2003 Open Access Book Book
Searching...
Searching...
30000010049583 QA76.76.O63 S46 2003 Open Access Book Book
Searching...

On Order

Summary

Summary

* Red Hat Linux X Internet Server takes the reader through all of the steps of setting up an Internet server using the Red Hat Linux operating system.
* It begins by describing Red Hat Linux networking basics, two example networks and the basics of DSL Internet connections, firewalls and troubleshooting in Part 1.This sets the foundation for all subsequent examples and provides readers with problem solving tools.
* Part 2 describes how to construct and manage a secure web server that is connected to a database. Part 3 shows the reader how to construct basic Internet services such as DNS, sendmail, FTP and Samba. Part 4 deals with advanced management techniques.
* The final part describes how to secure your network and servers. This part goes beyond the average coverage by showing advanced as well as basic security techniques and tools.
ABOUT THE CD-ROM
The CD-ROM has an open-source high-availability system/server created by the author and appropriate GPL server and security software.


Author Notes

Paul G. Sery works for Sandia National Laboratories, in Albuquerque, New Mexico, where he designs and manages several networks for the Computer Science Research Institute
Jay Beale is the founder and president of JJB Security Consulting


Table of Contents

Prefacep. vii
Acknowledgmentsp. x
Part I Building a Linux Network
Chapter 1 Introducing the Example Networksp. 3
Introducing the Sample Networksp. 3
Direct Connect to Internet (DCI)p. 4
DMZ to Internet (DMZI)p. 5
Explaining Server Functionsp. 6
Understanding the DCI configurationp. 9
Introducing the DMZI configurationp. 10
Adding Subnets to Both Networksp. 11
Chapter 2 Configuring Red Hat Linux Networkingp. 15
Introducing the Internet Protocolp. 16
Networking and the OSI network modelp. 16
Introducing the Transport layer protocolsp. 17
Explaining Network Layer Protocols (IP Routing)p. 18
Examining the Physical Link Protocols (Ethernet Frames)p. 19
Looking at the Network Layout of a Red Hat Linux Systemp. 20
Important network configuration filesp. 20
Important applications and scriptsp. 24
arp/rarpp. 24
ifconfigp. 25
netstatp. 26
nmapp. 26
pingp. 26
redhat-config-network-druid/redhat-config-network-cmdp. 27
routep. 27
sysctlp. 28
tcpdumpp. 29
modprobep. 30
Configuring One or More NICsp. 30
Example 1 Configuring a single NICp. 30
Example 2 Configuring dual NICs (dual homed)p. 35
Example 3 Configuring a Red Hat Linux routerp. 37
Chapter 3 Connecting to the Internet via DSLp. 43
Introducing DSL Technologyp. 44
Understanding DSL Terminologyp. 48
General termsp. 49
Types of DSL servicep. 52
Creating Your DSL Internet Connectionp. 54
Obtaining a DSL Internet connectionp. 54
Physically connecting your DSL modemp. 54
Configuring your DSL provider's equipmentp. 56
Basic Troubleshooting Hintsp. 62
Chapter 4 Building a Firewallp. 67
Introducing Firewallsp. 67
Packet filtering firewallsp. 68
Proxy firewallsp. 68
Hybrid firewallsp. 69
Understanding IP NAT or masqueradingp. 69
Understanding how a packet flows through the Internetp. 70
Introducing stateful IP packet filters (Netfilter/iptables)p. 73
Building the Firewallp. 79
Protecting the networks with a simple rule setp. 79
Tightening the firewall with custom chainsp. 86
Allowing External Connections via Secure Shellp. 92
Configuring the SSH serverp. 94
Modifying the firewall server (atlas) to allow SSHp. 98
Managing Your Firewallp. 98
Chapter 5 Introducing Basic Troubleshootingp. 101
Troubleshooting with the Fault Treep. 102
Troubleshooting Linux Networkingp. 103
Is the power turned on?p. 103
Has your network cabling been compromised?p. 103
Is your network switch or hub configured correctly?p. 104
Is your network adapter configured correctly?p. 105
Troubleshooting Your DSL Connectionp. 111
Checking your DSL modem/router configurationp. 112
Checking your DSL provider configurationp. 113
Checking your ISP configurationp. 114
Troubleshooting Your Firewall/Gatewayp. 114
Checking your Red Hat Linux networking configurationp. 115
Checking your gateway routes and IP forwardingp. 116
Checking your firewall scriptsp. 117
Checking your kernel modules and flagsp. 118
Using network sniffing toolsp. 118
Using Additional Informationp. 120
Part II Building a World Wide Web Server
Chapter 6 Configuring a Basic Apache Serverp. 125
Introducing the HTML and HTTP Protocolsp. 125
Presenting the HTTP protocolp. 125
Introducing the HTML standard (HTML is not a protocol)p. 126
Exploring the Apache Web Serverp. 131
Introducing the Apache configuration directivesp. 132
Introducing the Apache configuration filep. 132
Creating a Basic Web Sitep. 141
Installing the Apache Web serverp. 142
Configuring the Apache Web serverp. 142
Controlling the Apache Web serverp. 147
Accessing the Apache Web serverp. 147
Controlling access to the Web server with .htaccess and .htpasswdp. 147
Developing a Virtual Web Sitep. 149
Using SSL with Apachep. 151
Installing mod_ssl packagep. 152
SSL's negotiation and certificatesp. 152
Certificate Authoritiesp. 153
Setting up Apache for HTTPS with SSLp. 153
Making CA-signed Certificatesp. 154
Troubleshootingp. 156
Inspect the Linux system logsp. 156
Inspect the Apache logsp. 157
Connect locallyp. 157
Check your Apache configurationp. 158
Use a simplified httpd.conf, if possiblep. 158
Add new directives incrementallyp. 158
Chapter 7 Connecting a Database to the Web Serverp. 161
Introducing SQLp. 161
Installing and Configuring MySQLp. 163
Accessing the SQL Serverp. 165
Creating a databasep. 165
Using the MySQL databasep. 167
Interacting with the SQL Server by Using Scriptsp. 169
Displaying MySQL database datap. 169
Inserting data into a MySQL databasep. 173
Modifying MySQL database datap. 175
Using a CGI script to access a SQL database via a Web browserp. 179
Securing Your MySQL Databasep. 185
Chapter 8 Building a Simple Audio Streaming Serverp. 187
Introducing Streaming Technologyp. 187
Introducing the Xiph.org Foundationp. 188
Serving MP3 Streams with Icecast Version 1p. 189
Installing and Configuring Icecastp. 190
Installing and Configuring Icesp. 192
Serving Up MP3 Streamsp. 193
Serving Ogg Vorbis Streams with Icecast Version 2p. 195
Streaming Ogg Vorbis Locallyp. 196
Streaming Ogg Vorbis on the Internetp. 200
Summarizing the Icecast2 and Ices2 Configuration Filesp. 201
Troubleshootingp. 213
Part III Providing Basic Internet Services
Chapter 9 Building a Domain Name Serverp. 219
Introducing Domain Name Service (DNS)p. 219
Domainsp. 220
Zonesp. 220
Authoritative name serversp. 221
Understanding client name resolutionp. 222
Following a sample name service requestp. 222
Understanding Resource Recordsp. 225
Using Start Of Authority (SOA) resource recordsp. 226
Defining azone resource recordsp. 227
Introducing bind configuration statements and parametersp. 228
Introducing the /var/named/ configuration filesp. 230
Configuring a Basic DNS Serverp. 231
Configuring a primary name serverp. 231
Configuring a secondary name serverp. 237
Adding Security Measuresp. 237
Using ACLsp. 238
Using Transfer Signaturesp. 239
Running named in a chroot environmentp. 240
Starting and stopping the name serverp. 241
Creating Multiple Zone Filesp. 242
Configuring a Split-Domain DNS Serverp. 245
Configuring the Split-Domain private name serverp. 246
Configuring the Split-Domain DMZ name serverp. 247
Troubleshootingp. 249
named-checkzonep. 249
named-checkconfp. 249
digp. 250
hostp. 250
tcpdumpp. 251
Chapter 10 Creating an SMTP E-mail Serverp. 253
A Little Mailer Theoryp. 253
Compatibilityp. 254
Performancep. 254
Making use of it allp. 255
Understanding Mail Queuesp. 255
Understanding Configuration Parametersp. 255
Parameter Information and Syntaxp. 256
Valuesp. 256
Filesp. 256
Databases and Tablesp. 256
Handling Unsolicited Commercial E-mailp. 257
Examining Important Parameters in main.cfp. 257
queue_directoryp. 257
command_directoryp. 257
daemon_directoryp. 258
mail_ownerp. 258
default_privsp. 258
myhostnamep. 258
mydomainp. 259
myoriginp. 259
inet_interfacesp. 259
mydestinationp. 259
local_recipient_mapsp. 260
masquerade_domainsp. 260
masquerade_exceptionsp. 260
local_transportp. 260
alias_mapsp. 261
alias_databasep. 261
home_mailboxp. 261
mail_spool_directoryp. 261
mailbox_commandp. 261
mailbox_transportp. 262
fallback_transportp. 262
luser_relayp. 262
smtpd_recipient_limitp. 263
smtpd_timeoutp. 263
mynetworks_stylep. 263
mynetworksp. 263
allow_untrusted_routingp. 264
maps_rbl_domainsp. 264
smtpd_client_restrictionsp. 264
smtpd_sender_restrictionsp. 264
smtpd_recipient_restrictionsp. 265
smtpd_helo_requiredp. 265
smtpd_helo_restrictionsp. 265
smtpd_delay_rejectp. 266
strict_rfc821_envelopesp. 266
header_checksp. 266
body_checksp. 266
message_size_limitp. 266
relay_domainsp. 267
mynetworksp. 267
smtpd_bannerp. 267
local_destination_concurrency_limitp. 267
default_destination_concurrency_limitp. 268
debug_peer_listp. 268
debug_peer_levelp. 268
debugger_commandp. 268
disable_vrfy_commandp. 268
Setting Up Important Filesp. 269
Setting up master.cfp. 269
Setting up the aliases filep. 269
Setting up the virtual filep. 269
Setting up the canonical filep. 270
Setting p the access filep. 270
Using Commands to Process Datafilesp. 270
Understanding E-mail Server Terminologyp. 271
Mail User Agentsp. 271
Message storesp. 272
Mail Transport Agentsp. 272
Message headersp. 272
Envelopesp. 272
Sample Configurationsp. 273
Example 1 Sending mailp. 273
Example 2 Accepting e-mail for multiple domainsp. 274
Example 3 Postfix-Style virtual domainsp. 275
Forwarding from virtual address to virtual addressp. 275
Example 4 Verifying DNS settings for e-mailp. 277
Example 5 Directing all mail through a central mail hubp. 285
Example 6 Acting as a mail hubp. 286
Example 7 Reducing unwanted e-mailp. 286
Spamassassin basicsp. 288
Chapter 11 Configuring FTPp. 291
Introducing the FTP Protocolp. 291
Introducing Washington University FTP (WU-FTP)p. 293
Installing WU-FTPp. 293
Introducing the WU-FTP/xinetd configuration filep. 295
Introducing the ftpaccess configuration filep. 296
Introducing the ftpconversions filep. 301
Configuring a Real Mode FTP Serverp. 302
Configuring Guest Accountsp. 302
Configuring Anonymous Accountsp. 304
Configuring for Anonymous loginsp. 304
Configuring for anonymous uploadsp. 305
Troubleshooting the WU-FTP Serverp. 308
Conducting general purpose checksp. 308
Troubleshooting Guest FTP loginsp. 311
Troubleshooting Anonymous FTP loginsp. 313
Chapter 12 Configuring Sambap. 315
Introducing Sambap. 315
Examining the smb.conf syntaxp. 317
Examining the smb.conf parametersp. 317
Examining the smb.conf Structurep. 317
Learning Samba by Examplep. 319
Configuring Samba to use encrypted passwordsp. 319
Creating Samba sharesp. 323
Accessing an individual user's home directoryp. 323
Introducing Linux and Samba permissionsp. 324
Exporting a service to two or more usersp. 329
Using Samba's macro capabilityp. 331
Adding network printers by using Linux and Sambap. 333
Introducing SWATp. 338
Troubleshootingp. 339
Part IV Managing Your Linux Servers
Chapter 13 Automating Network Backupsp. 343
Introducing AMANDAp. 344
Understanding AMANDAp. 344
Introducing the AMANDA server and clientp. 344
Introducing the network servicesp. 346
Introducing the configuration filesp. 347
Introducing AMANDA utilitiesp. 348
Using AMANDAp. 350
Building a minimalist backup systemp. 351
Building a simple backup systemp. 353
Automating your backupsp. 359
Troubleshootingp. 360
Chapter 14 Increasing the Reliability of a Linux Serverp. 363
Locating Single Points of Failurep. 363
Using the Ext3 Journaling File Systemp. 364
Using RAID to Increase Reliabilityp. 367
Introducing software RAIDp. 368
Implementing Software RAIDp. 370
Creating a High Availability Linux Clusterp. 373
Understanding how HA worksp. 373
Exploring HA fail-over modesp. 374
Creating a simple HA Linux clusterp. 374
Testing the Heartbeatp. 377
Part V Increasing Security
Chapter 15 Introducing Basic Server Securityp. 383
Understanding the Threat to Securityp. 383
Going Beyond the Patchp. 384
Identifying Your Attackersp. 386
Categorizing attackersp. 386
Thinking about the Attacksp. 387
Considering a Defensep. 390
Chapter 16 Introducing Secure System Administrationp. 399
Sysadmin and the Security Officerp. 399
Auto-Updating, Patching, and Caveatsp. 400
Production and Development Environmentsp. 402
Auto-updating, Caveats, and a Red Hat Solutionp. 404
Minimizing, Standardizing, and Simplifyingp. 405
Embracing minimizationp. 406
The Three Cardinal Virtuesp. 408
Monitoring and Secure Remote Administrationp. 409
Central Management Systemsp. 411
Status Monitoringp. 412
Chapter 17 Hardening the Systemp. 415
Understanding System Hardeningp. 415
Hardening the system manuallyp. 417
Stopping or removing unnecessary programsp. 417
Recapping the Linux startup processp. 419
Returning to the network daemon auditp. 425
Hardening the system automatically with Bastille Linuxp. 439
Account Security modulep. 439
Boot Security modulep. 440
Configure Miscellaneous PAM Settings modulep. 440
Deactivate Miscellaneous Daemons modulep. 440
Disable User Tools modulep. 441
File Permissions modulep. 441
Logging modulep. 441
Printing modulep. 442
Secure inetd/xinetd modulep. 442
tmpdir Protection modulep. 442
Apache modulep. 442
BIND (DNS) modulep. 443
FTP modulep. 443
sendmail (E-Mail) modulep. 443
Firewall modulep. 444
Port Scan Attack Detector (PSAD) modulep. 444
Chapter 18 Introducing Simple Intrusion Detection Systemsp. 445
Examining Network vs. Host-Based Intrusion Detectionp. 445
Defining the Scope of Responsibilityp. 446
Your responsibilitiesp. 446
Responsibility equals authorityp. 448
Reviewing Useful Network Conceptsp. 449
Packetsp. 449
IP addressesp. 450
Portsp. 453
ICMPp. 457
UDPp. 457
TCPp. 457
Probes and threatsp. 459
Devising a Defensive Network Configurationp. 461
Router filtering and firewallsp. 461
Ingress/egress filteringp. 462
DMZp. 462
Bastion Hostsp. 462
Dedicated serversp. 462
Designing an ID Strategyp. 463
Setting the Rulesp. 464
Intrusion detectors don't detect intrusionsp. 464
Positive specifications--things that are badp. 464
Negative specifications--things that are not goodp. 465
Heuristic anomaly detection--The Holy Grailp. 465
Our Example NIDS--Snortp. 466
Description and History (current version: 1.8.6)p. 466
Overview of Snort Function (selected command-line options)p. 466
Chapter 19 Log Monitoring and Incident Responsep. 471
Reading Your System Logsp. 471
Loggingp. 472
Application loggingp. 473
System loggingp. 474
Hybrid loggingp. 475
Syslogp. 475
Performing Selector Actionsp. 476
Selector fields, facilities, and prioritiesp. 476
Destinationsp. 478
Using Logsp. 479
Direct examinationp. 480
Log parsing toolsp. 480
egrep--fast and dirtyp. 481
Report generationp. 483
Log monitoring toolsp. 487
Managing Event Responsesp. 488
Panic is bad, think aheadp. 488
Thinking ahead means policyp. 488
Appendix A What's Stored at www.wiley.com?p. 491
Appendix B Configuring a Dial-up Internet Connectionp. 495
Appendix C Automating Your Server Configurationp. 505
Appendix D Using DHCPp. 513
Indexp. 517