Il blog di Gas

Solo un altro sito WordPress

Archive for the ‘debian’ tag

Fail2ban and postfix sasl

with 2 comments

Today I found the usual chinese trying to get in my smtp to send his spam to the world and I realized that fail2ban wasn’t working because the regexp used to match the offender is wrong.

This is the log entry (/var/log/mail)
Aug 21 22:45:30 myserver postfix/smtpd[12071]: warning: unknown[xxx.xxx.xxx.xxx]: SASL LOGIN authentication failed: authentication failure

and this is the regex that work , just remove the part after “authentication failed” (/etc/fail2ban/filter.d/sasl.conf)

failregex = (?i): warning: [-._\w]+\[\]: SASL (?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed

Test it:
fail2ban-regex /var/log/mail.log /etc/fail2ban/filter.d/sasl.conf

if you are on a slow server or on a big mail server use /var/log/mail.err instead

Written by gas

agosto 21st, 2010 at 11:18 pm

Posted in English,Linux

Tagged with ,

Mldonkey and conky

with one comment

In the past conky had some built in features regarding mldonkey that have been dropped later. I launch a script that uses netcat to do the same thing ( at least what I need).


#! /bin/sh
USER=user ## mldonkey user
PASS=pass ## mldonkey password for user
HOST=192.168.1.2 ## host where mldonkey is running
PORT=4000 ##port
(echo "auth $USER $PASS";echo $1;echo q) | nc $HOST $PORT

and then for conkyrc

${execi 50 ml_command bw_stats|grep Down|awk -F " " '{print $1,$2,$3,$10,$11,$12}'}

Written by gas

febbraio 14th, 2008 at 2:12 pm

Posted in English,Linux

Tagged with , , , ,

Ubuntu, Debian Etch e le email

without comments

Ci sono in giro un sacco di howto complicati (sopratutti quelli che parlano di “Perfetct Setup”) su come creare un server mail in debian / ubuntu ma ce ne sono pochi per quelli come me che hanno la semplice esigenza di voler leggere le email generate dal sistema allo stesso modo di come leggono le email mandate dagli amici.In pratica la mia esigenza è quella di reindirizzare tutte le mail di sistema su una casella email esterna tipo mionome@gmail.com.

Read the rest of this entry »

Written by gas

maggio 17th, 2007 at 3:02 pm

Posted in Linux

Tagged with , , , ,

OpenDNS

without comments

OpenDNS è un servizio nato nel 2005 da David Ulevitch e mantenuto da un piccolo gruppo di sviluppatori . Dal 2005 ad oggi OpenDNS ha risolto correttamente 113 miliardi di richieste e si proprone come un servizio dns veloce, sicuro e sopratutto open.

OpenDNSI server dns hanno il compito di risolvere i nomi che noi digitiamo nella barra dell’indirizzo del browser in numeri ed in particolare in indirizzi IP più capibili da una macchina che le lettere. Per questo motivi è importante avere dei server dns affidabili e liberi dalle influenze dei vari governi anche quello italiano.Quando noi digitiamo “www.google.it” il nostro computer va a controllare sui server dns a che ip corrisponde quel nome, i server dns rispondono che al dominio google.it corrisponde l’ip “208.69.32.230″. Infatti digitando nella barra degli indirizzi del browser “www.google.it” o “208.69.32.230″ si viene indirizzati alla stessa pagina.

La maggior degli utenti in Italia non cambia i dns della propria connessione e quindi dato che le aziende che offrono il servizio adsl non sono poi così molte (per lo meno le grosse) anche i server dns usati non saranno poi così tanti.Questa situazione torna utilie a tutti coloro che giovano di un controllo sulla libertà , come il governo italiano che un po di tempo fa ha impedito a betway.com (un sito per fare scommesse) di lavorare in Italia perchè non ha pagato le tasse per poter operare ed allora ha obbligato le compagnie adsl a “modificare” i loro server dns reindirizzando www.betway.com ad una pagina del Ministero delle Finanze.So che sembra strano dato che betway finanzia la serie A , la motoGP e la Formula1 ma è così…provare per credere (testato con i dns di Alice). L’IP vero di betway è 195.244.207.20.

OpenDNS è la soluzione a questo e ad altri problemi quali il phishing informatico.

Read the rest of this entry »

Written by gas

aprile 25th, 2007 at 4:12 pm

Posted in Linux

Tagged with ,

Debian 4.0 out

without comments

A few months ago Etch was freezed now it has been officially released as Debian 4.0

These are the release notes and among the new changes I found:

  • PHP5.x
  • MySQL 5.x
  • Apache 2.2.x
  • GCC v4.1
  • from XFree86 to X.org v7.1

Updating

Fist of all install aptitude
apt-get install aptitude

I used to have Debian Sarge 64 that is a semi official backport , now Etch is shipped with amd64 architecture too so the backport is not needed anymore. Updating is not difficult , one should change all “sarge” to “etch” in /etc/apt/sources.list, mine look like this


deb ftp://mirror.switch.ch/mirror/debian/ etch main contrib non-free
#deb http://www.backports.org/debian sarge-backports main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free
deb-src http://http.us.debian.org/debian stable main contrib non-free
deb-src http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
# TOR
deb http://mirror.noreply.org/pub/tor etch main
deb-src http://mirror.noreply.org/pub/tor etch main

the “www.backports” line is comments out because etch hit stable just today. Backports are binaries compiled for etch and shipped for sarge, sometime you can’t install a package because it misses a dependency but you can run it because it doesn’t miss any dependency while it runs, hence that backports that let me use the latest mldonkey with sarge for example.

Then


apt-get update
aptitude -f --with-recommends dist-upgrade

Note that aptitude was used rather that apt-get dist upgrade because is known to be more strict on dependencies that apt-get dist-upgrade, installing aptitude here as docs say will bring in lots of other packages.
I hope that etch will be as good as sarge , for me sarge never hanged once in its life, the only problem I had was a that a couple of deamons used to exit silently after a couple of weeks running . Hopefully etch comes with a version of shorewall that is able to handle traffic shaping.

2 cents about gentoo : I love gentoo and I have no intention to change my desktop distro …but debian management is damn faster… I remeber last Gcc major upgrade , rebuilding the the system and then the world , emerge breaking during night, a couple of days compiling vs 20 min of debs fetching in debian.

Edit:
Squid and Shorewall have new configurations:

  • Squid: ( ola ola Christian )delete these lineshttpd_accel_host virtual
    httpd_accel_port 80
    httpd_accel_with_proxy on
    httpd_accel_uses_host_header on
    and add this always_direct allow all.Now look for http_port X.X.X.X and add “transparent” the result should be something like this:http_port 192.168.1.2:8080 transparent
  • Shorewall: have a look at /usr/share/doc/shorewall/examples . Now the file “zones” must contain the firewall zone, there are no comments and no display any more so in the end you should find something like this:net ipv4
    loc ipv4
    fw firewall

    ipv4 is the default for normail traffic

Written by gas

aprile 9th, 2007 at 2:19 pm

Posted in English,Generale,Linux

Tagged with , , ,

Tor e Privoxy su Debian Sarge

with 4 comments

Io navigo sempre dietro ad un proxy per migliorare l’efficienza della rete ( Squid ) e non per motivi di anonimato. Avevo un oretta libera ed ho provato tor. TOR è il diminutivo di The Onion Routing , un gruppo di server sparsi per il mondo che hanno il compito di proteggere i dati e le comunicazioni personali degli utenti.In parole povere serve a non mostrare il proprio ip ma quello di uno dei computer Onion Router.

Da solo serve a poco o a nulla , c’è bisogno di un proxy anonimo vero con cui Tor puo collaborare , nel caso ho scelto Privoxy ( ma potevo scegliere il polipo). Con questo setup privoxy è il proxy che anonimizza la connessione ( non mostra dati sulle pagine precedentemente visitate e riferimenti di vario tipo) e si appoggia a tor per “anonimizzare” l’ip.

Read the rest of this entry »

Written by gas

febbraio 16th, 2007 at 9:16 pm

Posted in Generale,Linux

Tagged with , , ,

Etch in Freezer

without comments

Etch is now frozen! Wheeeeeee!!!

E fra un po dovrò abbandonare il mio Sarge…

http://lists.debian.org/debian-devel-announce/2006/12/msg00004.html

Written by gas

dicembre 12th, 2006 at 2:42 pm

Posted in Linux

Tagged with ,