Mastering Linux Network Administration
Table of Contents
Mastering Linux Network Administration
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Setting up Your Environment
Getting started
Distributions to consider
Physical machines versus virtual machines
Setting up and configuring VirtualBox
Acquiring VirtualBox
Downloading and installing the Extension Pack
Acquiring and installing Debian 8
Acquiring and installing CentOS 7
Summary
2. Revisiting Linux Network Basics
Understanding the TCP/IP protocol suite
Naming the network device
Understanding Linux hostname resolution
Understanding the net-tools and iproute2 suites
Manually managing network interfaces
Managing connections with Network Manager
Summary
3. Communicating Between Nodes via SSH
Using OpenSSH
Installing and configuring OpenSSH
Connecting to network hosts via openssh-client
The OpenSSH config file
Understanding and utilizing scp
Transferring files to another node via scp
Tunneling traffic via SSH
Generating public keys
Keeping SSH connections alive
Exploring an alternative to SSH â utilizing Mosh (mobile shell)
Summary
4. Setting up a File Server
File server considerations
NFS v3 versus NFS v4
Setting up an NFS server
Learning the basics of Samba
Setting up a Samba server
Mounting network shares
Automatically mounting network shares via fstab and systemd
Creating networked filesystems with SSHFS
Summary
5. Monitoring System Resources
Inspecting and managing processes
Understanding load average
Checking available memory
Using shell-based resource monitors
Scanning used storage
Introduction to logging
Maintaining log size with logrotate
Understanding the systemd init system
Understanding the systemd journal
Summary
6. Configuring Network Services
Planning your IP address layout
Installing and configuring a DHCP server
Installing and configuring a DNS server
Setting up an internal NTP server
Summary
7. Hosting HTTP Content via Apache
Installing Apache
Configuring Apache
Adding modules
Setting up virtual hosts
Summary
8. Understanding Advanced Networking Concepts
Dividing your network into subnets
Understanding the CIDR notation
Implementing Quality of Service
Routing TCP/IP traffic
Creating redundant DHCP and DNS servers
Summary
9. Securing Your Network
Limiting the attack surface
Securing OpenSSH
Configuring the iptables firewall
Protecting system services with fail2ban
Understanding SELinux
Configuring Apache to utilize SSL
Deploying security updates
Summary
10. Troubleshooting Network Issues
Tracing routing issues
Troubleshooting DHCP issues
Troubleshooting DNS issues
Displaying connection statistics with netstat
Scanning your network with Nmap and Zenmap
Installing missing firmware on Debian systems
Troubleshooting issues with Network Manager
Summary
Index
Mastering Linux Network Administration
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2015
Production reference: 1231015
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-959-7
www.packtpub.com
Cover image by Jay LaCroix
Author
Jay LaCroix
Reviewers
Adriano Dos Santos GregĂłrio
Jitesh Marathe
Sabir Mustafa
Davor LoziÄ
Mosudi Isiaka
Commissioning Editor
Kartikey Pandey
Acquisition Editor
Harsha Bharwani
Content Development Editor
Sumeet Sawant
Technical Editor
Madhunikita Sunil Chindarkar
Copy Editor
Roshni Banerjee
Project Coordinator
Shweta H Birwatkar
Proofreader
Safis Editing
Indexer
Priya Sane
Production Coordinator
Shantanu N. Zagade
Cover Work
Shantanu N. Zagade
Jay LaCroix is a Michigan-born technologist with a focus on Linux and open source software. He has over 13 years of experience working with Linux, including servers, networking, scripting, programming, virtualization, and any open source technology he can get his hands on. He is currently working as a Linux systems engineer and enjoys writing, training, and empowering others to use Linux. He is also the author of Linux Mint Essentials.
Adriano Dos Santos GregĂłrio is an expert in the field of operating systems, he is curious about new technologies and is passionate about mobile technologies. He has been a Unix administrator since 1999 and he focuses primarily on networking projects with an emphasis on the physical and logical security of various network environments and databases. He has also reviewed some other Packt Publishing books such as Kali Linux Cookbook and Kali Linux CTF Blueprints.
He is a Microsoft Certified MCSA and MCT Alumni.
Jitesh Marathe is an IT professional with a bachelor's degree in computer application. He has spent most of his career being a system administrator at various IT companies and he specializes in System and Applications Operations and Support. Jitesh enjoys traveling to new places with his family.
He has also reviewed Linux Utilities Cookbook, Packt Publishing.
Sabir Mustafa has more than 13 years of work experience in the field of ICT and information technology, which includes:
- Delivery and awareness of information and automation policies to the employees of an organization
- Prepare, deploy, test, and manage solutions
- Conduct continuous tests and upgrades to ensure the protection of configurations and data
- Prepared and updated the technical documentation for teams and the data center
He is currently working as the project lead in a US-based multinational firm, Royal Cyber Inc. His expertise profile includes cloud services, Linux, JBoss Middleware, Windows Servers, and IBM Middleware.
Besides that, he holds a postgraduate degree in MC...