background preloader

Linux related

Facebook Twitter

Using Fail2ban to Secure Your Server. Updated by Linode Fail2ban is a log-parsing application that monitors system logs for symptoms of an automated attack on your Linode.

Using Fail2ban to Secure Your Server

When an attempted compromise is located, using the defined parameters, Fail2ban will add a new rule to iptables, thus blocking the IP address of the attacker, either for a set amount of time or permanently. Fail2ban will also alert you through email that an attack is occurring. Fail2ban is primarily focused on SSH attacks, although it can be further configured to work for any service that uses log files and can be subject to a compromise. The steps required in this guide require root privileges. Control Network Traffic with iptables. Updated by Linode Packet filtering using network rules such as NAT (network address translation) can be accomplished by using iptables.

Control Network Traffic with iptables

Iptables utilize ports and protocols and may also be used as a firewall. Using iptables for IPv4 By default, the iptables tool is included with your Linode supplied distribution. In order to use iptables, you will have to have root privileges to make changes. The iptables Command. Tip: How to clear sendmail mailbox for root & other users (Page 1) — Mail — The FreeBSD Community. Linux Journey. GIMP tutorials. 192.69.217. Strong Random Password Generator. Supported Linux distributions. LinuxLive USB Creator is currently supporting these Linux distributions: .IMG files are supported but it's experimental: it works only with a Live mode (no persistence) and no virtualization (because there is not enough free space on the USB key after writing the IMG file).

Supported Linux distributions

LinuxLive USB Creator will only burn the .IMG on your USB key, nothing more. These versions should work but I will provide no support whatsoever: Any modified variants of the supported versions (like translated ISO)Any Linux using syslinux or grub and USB boot capable (most of them are)Any non "Live" version of the supported Linuxes (but only for booting and installing on disk since they are not "Live") These versions WILL NOT WORK: BSD variantsISO of Windows XP or Mac OSX. FreeDOS bootable image generation HOWTO. This document describes how to make a small image which can be booted either via PXE or after writing it to an USB flash drive.

FreeDOS bootable image generation HOWTO

I used Debian Linux 7 "wheezy" for this. But other Linux distributions should work too. What you will need syslinux – BootloaderGNU parted – Other partitioning tools did not yield a bootable image.mkfs.msdos (or mkdosfs) – Debian and Arch Linux users can install the dosfstools packagekpartx – A tool for mounting partitions within an image file; Debian has this in the kpartx package; For Arch Linux the multipath-tools from AUR look promising.The FreeDOS distribution ISO: fd11src.iso (or look here for the latest release: smaller utilities everyone should have: dd, unzip, find, xargs … There is no fancy GUI for all the tools involved, so you should be familiar with the console. :) The Instructions Create an image file with bootable partition First, we use dd to write a blank file, 30 MB in size: # dd if=/dev/zero of=FreeDOS-image.img bs=1M count=30 Looks fine!

How to stop your IP address being blocked by denyhosts. What is free software? This page is maintained by the Free Software Foundation's Licensing and Compliance Lab.

What is free software?

You can support our efforts by making a donation to the FSF. Have a question not answered here? Check out some of our other licensing resources or contact the Compliance Lab at licensing@fsf.org. The Free Software Definition The free software definition presents the criteria for whether a particular software program qualifies as free software. Parallel tutorial. This tutorial shows off much of GNU parallel's functionality.

Parallel tutorial

The tutorial is meant to learn the options in GNU parallel. The tutorial is not to show realistic examples from the real world. Spend an hour walking through the tutorial. Your command line will love you for it. To run this tutorial you must have the following: parallel >= version 20160222 Install the newest version using your package manager or with: (wget -O - pi.dk/3 || curl pi.dk/3/ || fetch -o - | bash This will also install the newest version of the tutorial:

Use multiple CPU Cores with your Linux commands. Here’s a common problem: You ever want to add up a very large list (hundreds of megabytes) or grep through it, or other kind of operation that is embarrassingly parallel?

Use multiple CPU Cores with your Linux commands

Data scientists, I am talking to you. You probably have about four cores or more, but our tried and true tools like grep, bzip2, wc, awk, sed and so forth are singly-threaded and will just use one CPU core. To paraphrase Cartman, “How do I reach these cores”? Let’s use all of our CPU cores on our Linux box by using GNU Parallel and doing a little in-machine map-reduce magic by using all of our cores and using the little-known parameter –pipes (otherwise known as –spreadstdin). Your pleasure is proportional to the number of CPUs, I promise. Examples using grep. Kolmisoft MOR Fail2ban. Parallel. GNU parallel is a shell tool for executing jobs in parallel using one or more computers.

Parallel

A job can be a single command or a small script that has to be run for each of the lines in the input. The typical input is a list of files, a list of hosts, a list of users, a list of URLs, or a list of tables. A job can also be a command that reads from a pipe. GNU parallel can then split the input and pipe it into commands in parallel. If you use xargs and tee today you will find GNU parallel very easy to use as GNU parallel is written to have the same options as xargs. GNU parallel makes sure output from the commands is the same output as you would get had you run the commands sequentially. Free software, free society: Richard Stallman at TEDxGeneva 2014.

GNU Parallel tutorial. Use multiple CPU Cores with your Linux commands. Regular expressions. 4.1.1.

Regular expressions

What are regular expressions? A regular expression is a pattern that describes a set of strings. Regular expressions are constructed analogously to arithmetic expressions by using various operators to combine smaller expressions. The fundamental building blocks are the regular expressions that match a single character. Most characters, including all letters and digits, are regular expressions that match themselves.