Lynis Tutorial. Free Security auditing tool for Linux

In this Lynis tutorial you will learn:

  • How to install Lynis tool in CentOS and Debian Linux.
  • Perform Linux security audit with Lynis
Lynis Tool for Linux Audit

Lynis is a free and open source security auditing tool for Linux, mac OS, and other systems based on UNIX. The tool checks the system and the software configuration, to see if there is any room for improvement the security defenses. All details are stored in a log file. Findings and other discovered data is stored in a report file. This can be used to compare differences between audits. Lynis can run interactively or as a cronjob. Root permissions (e.g. sudo) are not required, however provide more details during the audit.lynis audit tool

Lynis Install on Linux Server

Lynis Install on CentOS / RedHat

# dnf install lynis

or:

# yum install lynis

Lynis Install on Ubuntu / Debian

# sudo apt install lynis

Install Lynis from GitHub

However, if the utility version in your repository is not the latest, it is better to install Lynix with GitHub.

# git clone https://github.com/CISOfy/lynis.git
# cd lynis/

run:

# ./lynis

Lynis Audit System

Running a security audit of a Linux system:

$ ./lynis audit system

After the launch, the Lynis will perform several hundred tests and display detailed reports on the screen.

Then we will receive a detailed report, and results will be saved in log files:

Log file: /var/log/lynis.log
Report file: /var/log/lynis-report.dat

At the end of scan the report will contain warnings, suggestions also Lynis Hardening index:

Conclusion

In this Lynis tutorial you learned how to install Lynis auditing tool on Linux, and how to perform a security audit of Linux server.

   

If you like what you are reading, please:

Buy me a coffeeBuy me a coffee

arstech

Leave a Reply