The most important first step in developing a secure environment is to avoid, wherever possible, having your Linux system being the first line of defense from outside attack. The best way to do this is to ensure that you have a firewall installed between your Linux system (or the network on which it is installed) and the connection to the internet. If, for example, your Linux system is currently connected directly to a cable or DSL modem box then you will need to think seriously about installing a router or wireless base station that includes a firewall feature between the modem and your Linux system. Linux does come with a firewall that can be configured to protect you and we cover this later in the book. It is better, however, not to rely solely on this.
A firewall essentially stands between your computer or network on which your computer resides and shields it from the dangers lurking on the internet. It can either be a software program that runs on a computer system or it can be built into a hardware device such as a wireless base station or router hub. In this chapter we are going to look at
firewalls as a part of a wired or wireless hub. In later chapters we will look at configuring the firewall software on a Linux system to provide a second layer of defense against attack.
It is refreshing in an industry filled with cryptic terms and three letter acronyms (better known as TLAs) to come across a name that is at least somewhat self explanatory.
Consider the internet to be inferno of viruses, hackers and cyber criminals all looking for systems that they can invade. Rather like a firewall in real life it stops any of this unpleasantness from spreading into your environment. Another good analogy is that of a fortress wall that protects the inhabitants that live inside. The firewall stops unwanted connections from entering your internal network much like the wall around a fortress prevented the marauding hoards in medieval times. Rather like the gate in the fortress wall the firewall allows only data and connections that meet certain criteria to pass through the wall to the internal network.
The firewall is positioned between the outside internet connection coming in through the modem and the internal network on which reside a number of Linux and Windows systems. The firewall controls all data traffic and filters out anything that is not permitted to enter the internal network.