Fail2Ban to protect various server types from intrusions

Posted: settembre 24th, 2013 | Author: | Filed under: Administration, English, Guide, Howto, recensione | Tags: , , , , , , , , , | No Comments »

It’s quite normal to see some ip addresses that try to connect to my ssh server with bruteforce attacks. Fail2Ban is the solution to block these attacks.

Setup it’s very easy:

aptitude install fail2ban
cd /etc/fail2ban
sudo cp jail.conf jail.local

now we can edit jail.local to change the default configuration.

to enable email notifications, we have to change the line:

action = %(action_)s


action = %(action_mw)s

everything is configured right now, you will receive an email notification for each attack blocked.


simulate keyboard/mouse input

Posted: settembre 23rd, 2013 | Author: | Filed under: English, Guide, Howto | Tags: , , , , , , , , | No Comments »

The program that you have to use to do what’s in the subject is: xdotool

eg. xdotool key –clearmodifiers –window `(xdotool search –classname Navigator | head -1)` ctrl+alt+p

OMG I’ve deleted a system directory! How do I recover it?

Posted: febbraio 20th, 2013 | Author: | Filed under: English, Guide, Howto | Tags: , , , , , , , , , , | No Comments »

Ok, a little introduction first. I was working on an uninstall target of a Makefile for a system library. For a very unlucky case (or maybe for my stupidity) I’ve deleted (fortunately not all) my /usr directory :)

And now?

As I said before not every files and binaries were deleted because I realized quickly what I was doing and I pressed ctrl-c to stop it before it was late.

Let’s start with the trick.
Read the rest of this entry »

Installare Xilinx 14.2 in GNU/Linux (Debian Sid) per programmare una Spartan-6 LX9

Posted: ottobre 23rd, 2012 | Author: | Filed under: Guide, Howto, Programmazione, VHDL | Tags: , , , , , , , , , , , , , | No Comments »

Ho la necessità di utilizzare il software ISE 14.2 (della suite di Xilinx) per programmare una microboard Spartan-6 LX9, ovviamente su GNU/Linux (Debian Sid ma funziona anche su altri sistemi GNU/Linux).

Il procedimento è tutto sommato semplice se non fosse per la compilazione dei driver per la connessione via usb al device. Infatti i driver, che si trovano nella directory linux_drivers presente nel tarball, non compilano probabilmente per una incompatibilità del kernel (uso Linux 3.2).

Con questa guida verrà installato il plugin Digilent ad ISE. Questo plugin non fa altro che istruire il software a comunicare direttamente con il circuito di configurazione USB-JTAG Digilent.
Read the rest of this entry »

How to automatically execute a VIM command only for some file types

Posted: maggio 21st, 2012 | Author: | Filed under: English, Guide, Howto | Tags: , , , , , , | No Comments »

I want to set the maximum line length to a certain value, only for tex files.

VIM has a command to force line length. It’s:

set tw=120

To automatically execute this command only for tex files, you have to edit your vimrc file (~/.vimrc or /etc/vim/vimrc) adding the following lines:

if has("autocmd")
autocmd BufRead,BufNewFile *.tex set tw=120

Now VIM will execute this command every time that you will open a tex file.

  • Articoli Recenti:

  • Tag

  • Categorie

  • Meta

  • Licenza Creative Commons

    Copyright © 2020, | – Blog is proudly powered by WordPress All rights Reserved | Theme by Ryan McNair modified By Francesco Apollonio

    Smilla Magazine Il Bloggatore Feedelissimo - tecnologia WebShake - tecnologia