Blocking incoming traffic

One of the most important tasks for a Linux system administrator is to control access to network services. At times, it may be better to block all incoming traffic on the server and only allow the required services to connect.

Getting Ready

As we will be using Iptables here as well, no extra package is needed to perform these steps. We just need a user account with super user access. However, this account should preferably not be a root account.

How to do it...

We will configure Iptables to deny everything except the traffic that has been initiated from inside our system (such as web browsers that get web traffic or a download that has already been initiated to update the package or any other software):

  1. As seen in previous ...

Get Practical Linux Security Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.