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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.