Book Image

Mastering Linux Network Administration

By : Jay LaCroix
Book Image

Mastering Linux Network Administration

By: Jay LaCroix

Overview of this book

Linux is everywhere. Whether you run a home office, a small business, or manage enterprise systems, Linux can empower your network to perform at its very best. Armed with the advanced tools and best practice guidance of this practical guide, you'll be able to mold Linux networks to your will, empowering your systems and their users to take advantage of all that Linux-based networks have to offer. Understand how Linux networks function and get to grips with essential tips and tricks to manage them - whether you're already managing a networks, or even just starting out. With Debian and CentOS as its source, this book will divulge all the details you need to manage a real Linux-based network. With detailed activities and instructions based on real-world scenarios, this book will be your guide to the exciting world of Linux networking.
Table of Contents (17 chapters)
Mastering Linux Network Administration
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Configuring the iptables firewall


By default, Linux includes a firewall, iptables. This firewall should automatically be available on most (if not all) flavors of Linux. In this little activity, we'll set up a firewall on our Linux system. This should work fine regardless of which of the major distributions you use, but I'll call out anything that may be distribution specific. Before we get started though, I'll recommend that you play with this on a test machine, such as a VM or something you have physical access to. If you're using SSH, you may get disconnected when we enable the firewall, though I'll provide these steps in an order that hopefully, shouldn't drop your connection. Having a dedicated test machine to play around with is a good idea anyway.

With that out of the way, let's get started. Unfortunately, by default, iptables is wide open. It's so open, in fact, that it blocks nothing. To see this for yourself, issue iptables -L as root. Your output will probably look like this:

Chain...