How to do it...

  1. On the first system, we install the PortSentry package, using the following command:
    apt-get install portsentry

  1. During the installation process, a window will open containing some information about PortSentry. Just click Ok to continue.
  1. As soon as the installation completes, PortSentry starts monitoring on TCP and UDP ports. We can verify this by checking the /var/log/syslog file by using the following command:
    grep portsentry /var/log/syslog

We can see messages related to portsentry in the log.

  1. Now on the second machine, ...

Get Practical Linux Security Cookbook - Second Edition 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.