Tag Archives: bash

Configurando múltiplos ambientes Python

27 Jan

Multiple python environments Work with various python versions with multiple versions of python environments has become something common in my life, and, I believe that an easy way of setting this environments are something very useful, and not simple for most of people. I created a simple shell script that set this environment, that is […]

Atualize o hosts.deny para bloquear tentativas de brute force

2 Sep

Here I show a sinple script to block IPs that try brute force at your host, preventing you from use a alternative ssh port, as example. The script runs over /var/log/messages and detect via regex brute force attemps, and add IPs to /etc/hosts.deny Code: #!/bin/bash cp /etc/hosts.deny /var/tmp/hosts.deny # Jun 8 00:39:43 mintaka sshd[23332]: User […]

Matando sessões de outros usuários em servidores *nix, mas só como root.

29 Jun

Bem, certo dia da minha vida, tive que kickar um sysadmin do servidor dele, onde eu estava instalando um portal pq ele realmente estava me atrapalhando, ficava reiniciando postgresql toda hora, o servidor também … enfim, ridículo :D. Me bateu uma luz (por causa do mesmo sysadmin) hoje e fiz uma coisa legal, segue abaixo […]

pingping – Verificando conexão com servidores.

25 Jun

Above is my pingping script. This script send a mail alert when some server stop, based on regular ICMP requests. Read it! #!/bin/sh # This script send ICMP requests for each server on SERVIDORES list and sends # emails for emails in LISTA_EMAILS list why one of servers doesn’t reply # You only receive alerts […]