وبلاگ بلیان

Using and Administering Linux: Volume 3, Zero to SysAdmin: Network Services, 2nd Edition

معرفی کتاب «Using and Administering Linux: Volume 3, Zero to SysAdmin: Network Services, 2nd Edition» نوشتهٔ David Both، منتشرشده توسط نشر Apress L. P. در سال 2023. این کتاب در 536 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «Using and Administering Linux: Volume 3, Zero to SysAdmin: Network Services, 2nd Edition» در دستهٔ برنامه‌نویسی قرار دارد.

In Using and Administering Linux: Volume 3 you’ll work with multiple VMs on a single physical host to create a network in which to sharpen your sysadmin skills. Chapters have been fully updated to Fedora Linux 38 with expanded content and figures as well brand new material on the BTRFS file system, using Zram for swap, NetworkManager, automation with Ansible, as well as systemd. Focusing on network and other advanced services, this second edition of the final series volume builds upon the skills you have learned so far in volumes 1&2 and will depend upon the virtual network and VMs created there. Start by reviewing the administration of Linux servers and install and configure various Linux server services such as DHCP, DNS, NTP, and SSH server that will be used to provide advanced network services. You’ll then learn to install and configure servers such as BIND for name services, DHCP for network host configuration, and SSH for secure logins to remote hosts. Other topics covered include public/private keypairs to further enhance security, SendMail and IMAP and antispam protection for email, using Apache and WordPress to create and manage web sites, NFS, SAMBA, and Chrony. This volume also covers SELinux and its use in making your systems even more secure., You will learn to build RPMs to be used to distribute automation scripts. All of these services are installed on a single server host over the course of the book and by the time you are finished you will have a single server that provides these services for your network. What You Will Learn: • Install, configure, and manage several Linux server services such as email with spam management and single and multiple web sites • Work with NTP time synchronization, DHCP, SSH, and file sharing with Unix/Linux and Windows clients • Create RPMs for distribution of scripts and administrative programs. • Understand and work with enhanced security. Who This Book Is For: Those who are already Linux power users – SysAdmins who can administer Linux workstation hosts that are not servers – who want to learn to administer the services provided by Linux servers such as web, time, name, email, SSH, and more. Table of Contents 5 About the Author 16 About the Technical Reviewers 17 Acknowledgments 18 Introduction 19 Chapter 42: Server Preparation 31 Objectives 31 Overview 32 Creating the VM 32 Installing Linux 34 Personalization and Updates 36 Virtual Network Configuration 37 Adjusting the Firewall 50 Overview of DHCP 52 Installing the DHCP Server 53 Configuring the DHCP Server 54 Configuring the Client Host 59 Configuring Guest Hosts 61 The Final dhcpd.conf File 64 Configuring NTP with Chrony 65 Configuring the NTP Server 65 Configure and Test the NTP Client 67 Chapter Summary 70 Exercises 70 Chapter 43: Name Services 72 Objectives 72 Introducing Domain Name Services 72 How a Name Search Works 73 Top-Level Configuration 75 NSS and NSSwitch 75 resolv.conf 79 Historical Usage 79 Current Usage 80 systemd-resolved.service 82 Name Service Strategies 83 The /etc/hosts File 83 mDNS 87 How It Works 87 mDNS Performance 88 nss-DNS 89 The DNS Database 89 Using the dig and nslookup Commands 91 Interpreting dig Command Results 93 Advanced dig Command Results 95 Common DNS Record Types 95 SOA 95 $ORIGIN 96 NS 97 A 97 AAAA 97 CNAME 97 DNSKEY 98 DS 98 MX 98 PTR 99 RRSIG 99 Other Records 99 Using BIND 99 Preparation 100 Setting Up the Caching Name Server 103 Configuring the Firewall for DNS 106 Start the Name Service 107 Reconfiguring DHCP 109 Using the Top-Level DNS Servers 110 Creating a Primary Name Server 111 Creating the Forward Zone File 111 Adding the Forward Zone File to named.conf 113 Adding CNAME Records 114 Creating the Reverse Zone File 116 Adding the Reverse Zone to named.conf 117 Automating BIND Administration 120 Chapter Summary 120 Exercises 121 Chapter 44: Routing 122 Objectives 122 Introduction 122 Routing on a Workstation 123 Creating a Router 125 Setting Up the Router 126 Kernel Configuration 126 Firewall State 128 Firewall Requirements 129 Zones 129 Zoning Strategy 132 About the Trusted Zone 132 Adapting the Firewall 134 Network Routing 136 Complex Routing 138 Fail2Ban 139 Cleanup 142 Chapter Summary 143 Exercises 143 Chapter 45: Remote Access with SSH 144 Objectives 144 Introduction 144 Starting the SSH Server 146 How SSH Works – Briefly 148 Public/Private Key Pairs 149 How PPKPs Work 149 X-Forwarding 155 The X Window System 158 Remote Commands 159 Remote Backups 160 Chapter Summary 162 Exercises 162 Chapter 46: Security 164 Objectives 164 Introduction 165 Security by Obscurity 166 What Is Security? 167 Data Protection 167 Security Vectors 168 Self-Inflicted Problems 168 Environmental Problems 169 Physical Attacks 170 Network Attacks 170 Software Vulnerabilities 171 Linux and Security 172 Login Security 172 Checking Logins 173 Telnet 180 Some Basic Steps 184 PAM 187 Advanced DNS Security 189 About chroot 189 Enabling bind-chroot 189 Hardening the Network in the Kernel 192 Restrict SSH Root Login 194 More firewalld 195 Disabling All Traffic in Case of Emergency Using CLI 196 Access from Specific IP Addresses or Networks 197 Malware 200 Root Kits 200 ClamAV 205 Tripwire 208 SELinux 211 Additional SELinux Considerations 217 Social Engineering 217 Chapter Summary 218 Exercises 219 Chapter 47: Back Up Everything – Frequently 221 Introduction 221 Backups to the Rescue 222 The Problem 222 Backup Options 228 tar 229 Off-Site Backups 233 Disaster Recovery Services 235 Options 235 What About the “Frequently” Part? 236 How Frequent Is “Frequently?” 236 What Does “Full” Really Mean? 237 All vs. Diff 238 Considerations for Automation of Backups 238 Dealing with Offline Hosts 238 Advanced Backups 239 rsync 239 Performing Backups 245 Recovery Testing 248 Chapter Summary 248 Exercises 249 Chapter 48: Introducing Email 251 Objectives 251 Introduction 251 Definitions 252 Email Data Flow 253 Structure of an Email 255 Email Headers 255 Sendmail on the Server 260 Sendmail Installation 261 Sendmail Configuration 262 DNS Configuration 273 Sendmail on the Client 274 SMTP: The Protocol 278 Email-Only Accounts 282 Who Gets Email for Root? 283 Things to Remember 285 It Is Not Instant 285 There Is No Delivery Guarantee 285 Chapter Summary 286 Exercises 286 Chapter 49: Advanced Email Topics 288 Objectives 288 Introduction 288 The Real Problem with Email 289 Preparation 290 More mailx 290 Setup 296 Installing IMAP on the Server 297 Installing UW IMAP 298 Installing Dovecot IMAP 300 Testing IMAP 301 Email Clients 303 Alpine 304 Installation 305 Exploring Alpine 305 Thunderbird 321 Adding Authentication to the Server 333 SMTP Authentication 334 Certificates 341 Other Considerations 342 Resources 342 Chapter Summary 343 Exercises 343 Chapter 50: Combating Spam 345 Objectives 345 Introduction 345 The Problem 346 But Why? 347 My Email Server 347 Project Requirements 348 Procmail 349 How It Works 350 Preparation 351 Configuration 352 Configuring Sendmail 352 Hacking mimedefang-filter 356 Configuring Procmail 364 Reports of Procmail's Demise 368 SpamAssassin Rules 368 Additional Resources 372 Chapter Summary 373 Exercises 374 Chapter 51: Apache Web Server 375 Objectives 375 Introduction 375 Installing Apache 376 Testing Apache 376 Creating a Simple Index File 379 Adding DNS 382 Good Practice Configuration 383 Virtual Hosts 384 Configuring the Primary Virtual Host 384 Configuring the Second Virtual Host 386 Using Telnet to Test the Website 387 Using CGI Scripts 390 Using Perl 390 Using Bash 392 Redirecting the Web Page to CGI 393 Refreshing the Page Automatically 395 Chapter Summary 395 Exercises 396 Chapter 52: WordPress 397 Objectives 397 Introduction 397 Install PHP and MariaDB 398 Install WordPress 399 HTTPD Configuration 401 Creating the WordPress Database 401 Configuring WordPress 403 Administering WordPress 406 Updating WordPress 408 Exploring MariaDB 409 Chapter Summary 411 Exercises 411 Chapter 53: Mailing Lists 412 Objectives 412 Introduction 412 Installing Sympa 413 About Sympa Documentation 414 Sympa Configuration and Integration 415 Getting Started with a New List 423 Creating a Mailing List 423 Testing the List 428 Global and Local Settings 429 Startup Problems 430 Rejections from Large Email Services 431 Chapter Summary 432 Exercises 432 Chapter 54: Remote Desktop Access 434 Objectives 434 Introduction 434 TigerVNC 435 Security 443 Chapter Summary 445 Exercises 446 Chapter 55: Advanced Package Management 447 Objectives 447 Introduction 447 Preparation 449 Examining the Spec File 452 Preamble 453 %description 455 %prep 455 %files 456 %pre 456 %post 456 %postun 457 %clean 458 %changelog 458 Building the RPM 458 Testing the RPM 461 Rebuilding a Corrupted RPM Database 462 Chapter Summary 463 Exercises 463 Chapter 56: File Sharing 464 Objectives 464 Introduction 464 Preparation 466 Firewall Considerations 468 Firewall Configuration for FTP 469 Active Mode 469 Passive Mode 470 FTP and FTPS 471 VSFTP 472 Installation and Preparation of VSFTP 472 The FTP Client 474 Anonymous FTP Access 477 Securing VSFTP with Encryption 478 NFS 481 NFS Server 481 NFS Client 483 Cleanup 485 SAMBA 485 Using the SAMBA Client 491 Midnight Commander 492 Apache Web Server 495 Chapter Summary 500 Exercises 501 Chapter 57: Where Do I Go from Here? 503 Introduction 503 Curiosity 503 Convert 504 Tools 505 Resources 506 Contribute 507 Teaching 507 Writing 508 Coding and Packaging 508 Donate $$ 509 Skip This 509 Compiling the Kernel 509 Chapter Summary 510 Bibliography 512 Books 512 Web sites 513 Web articles 513 systemd 519 Index 522
دانلود کتاب Using and Administering Linux: Volume 3, Zero to SysAdmin: Network Services, 2nd Edition