Article Index

Here you will find interesting information on how to install and use open source software. Select and Navigate from the right menu.

What is “Linux”?

“Linux” itself is just the kernel – the core part of the operating system. Other software, such as the GNU C compiler used to compile the kernel, bash command-line shell, GNU shell utilities (all the basic commands you would use on a command line), X.org graphical server, a graphical desktop like Unity, and the software that runs on top of the graphical desktop, like Firefox, are all produced by different groups of developers. Linux distributions assemble all this disparate software from different developers and call the complete package “Linux.”

The GNU Project

Richard Stallman started working on GNU in 1983. GNU was designed to a complete, Unix-compative OS made up of free software. GNU means “GNU’s Not Unix!” In 1991, the GNU project had completed  many of its parts gcc Compiler, its  command-line shell (bash) and many others shell utilities (ie Emacs text editor etc). Other parts of the newly arrived  operating system would be provided by existing free software, such as the X Window System, providing its graphical desktop.

Linux Arrives

The kernel was considered as the missing piece of the GNU operating system. In 1991, Linus Torvalds released the first version of the Linux kernel. There was now enough software for a completely free operating system, and distributors (like modern “Linux distributions”) assmbled the Linux kernel, GNU software, and X Window System together. Initially, there was some debate over what these distributions should be called. GNU/Linux is the preferred term advanced by Richard Stallman and the Free Software Foundation. Debian still names itself “GNU/Linux” today.

The Case for "GNU/Linux" and simply "Linux"

The GNU project makes up a large part of the standard “Linux” system and was a project intended to develop a full operating system, named GNU. However, a significant part of Richard Stallman’s objection to the term “Linux” is that it downplays the significance of GNU and its original purpose: as a completely free operating system intended to provide freedom to users. Proponents of the term “Linux” argue it’s a mistake to focus only on GNU, as the average distribution contains software from a variety of organizations and could be called Mozilla/KDE/Apache/X.org/GNU/Linux with similar justification.

Because of its popularity, and its open source nature, many "Linux distros" were developed focusing on the "desktop", server" and "IoT" market. These Linux distros are free but not exactly open source primarily because, the way the open-source (or other proprietary) packages  are put together is not disclosed. In either way, they are by far much leaner than Windows, faster with less hardware requirements, have more fun because you control and manage you own stuff and is free spurring innovation and development.

 


Linux Distributions

Debian also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993.  Debian based distributions:

Ubuntu

Ubuntu is a distribution based on Debian, designed to have regular releases, a consistent user experience and commercial support on both desktops and servers. There are various Ubuntu-based variants that use different desktop environments.

Kubuntu

An official derivative of Ubuntu Linux using KDE instead of the GNOME (or Unity) desktop environment used by default in Ubuntu.

Lubuntu

An official derivative of the Ubuntu operating system that is "lighter, less resource hungry and more energy-efficient", using the LXQt desktop environment (used LXDE before 18.10).

Ubuntu MATE

An official derivative of Ubuntu using MATE, a desktop environment forked from the now-defunct GNOME 2 code base.

Xubuntu

An official derivative of Ubuntu using Xfce. Xubuntu is intended for use on less-powerful computers or those who seek a highly efficient desktop environment on faster systems, and uses mostly GTK applications.

Linux Mint

Linux Mint is a community-driven Linux distribution based on Ubuntu which itself is based on Debian, and bundled with a variety of free and open-source applications.

Zorin OS

Zorin OS is a personal computer operating system designed and promoted for users new to Linux-based computers. One of its built-in features lets users change the interface to resemble those of Microsoft Windows or MacOS

 


 

Fail2ban is a log parsing linux application that goes through your server logs files to check failed login attempts and automatically add new iptables rule to block the IP address of the attacker. fail2ban can be configured with respect the banned time, the checking period of time, the iptable chain to affect as well as  which TCP/UDP ports to blocks in addition. Has been initially used for ssh attacks. Fail2ban can also alert you through email that an attack is occurring.

How to install: apt-get install fail2ban (by default the ssh jail is enabled)

How to configure: 

  • nano /etc/fail2ban/jail.local  and add the following :
    [nextcloud]
    enabled
    = true

    port
    = http,https

    filter
    = nextcloud

    logpath
    = ..../nextcloud-data/nextcloud.log

    maxretry
    = 6
  • nano /etc/fail2ban/filter.d/nextcloud.conf  and add the following :
    [INCLUDES]
    before = common.conf
    [Definition]
    failregex = Login failed.*Remote IP.*'<HOST>'
    ignoreregex =
  • nano /etc/fail2ban/jail.d/nextcloud.local  and add the following :
    [nextcloud]
    enabled = true
    filter  = nextcloud
    action =iptables-allports[name=nextcloud, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain=FORWARD]
    logpath = /mnt/hdd_nextcloud/kvm_nextcloud/nextcloud-data/nextcloud.log
    findtime = 600

In short for any new rule you must create a filter (placed at /filter.d) a jail (placed at jail.d) and update the jail.local file with the rules. Pay attention on how to create the regular expression (online tool here !!). Check your log file, where the remote IP address is placed. fail2ban parses log file checking for certain text ("Login failed") after which the attacker's IP address is logged. After the addition of a new rule  "service fail2ban stop""service fail2ban start".

  • check its status:fail2ban-client nextcloud status  or fail2ban-client status
  • unbann any IP blockedfail2ban-client set nextcloud unbanip 150.140.0.0
  • regularly check if fail2ban is there:  iptables -nL -v
  • customize sendmail with action = %(action_mw)s to receive email notification when an IP is banned (you may whitelist some IPs to avoid troubles with internal IPs)

 

fail2ban is an essential tool for protecting your server.