Category Archives: networking

Evolution 2.24 = Epic fail?

I took this photos five minutes ago.

<rant>

After this and this, I’m tired, I can’t update…evolution 2.24 sucks a lot!

</rant>

By the way, I’m not going to switch to Thunderbird or $random_email_client, I was satisfied by previous releases. I’m hopeful this version will be fixed.

Update 24/11/2008@11:25: probably I have a credit with emails :P


Update 04/12/2008@10:18: I’ve a lot of news :-) I’m using the 2.24.2 since I found it on koji, few problems was solved but most of them remains, for example this and this :-) The work to do is huge, I hope to see improvements next minor release in January 2009.

Update 08/12/2008@10:35: 2 hours to filtering message…what the fuck…I’m looking for an alternatives :(

Update 17/12/2008@18:27 Right now, I can say that there is no alternative to evolution. The answer to “why not?” is “Evolution implements a very good virtual folders idea”.

Why virtual folders are so important for me? because permit you to abstract you email trees and make it independent by accounts number, account type, etc…The classical approach suppose you use POP, download your mail and manage it in locale. But if you use IMAP, for example, every email tree is independent, and there is no way to work with email from each account at the same time. To be hones, this is not really true. Right now the most innovative feature is the possibility to save a search (supported by Evolution, KMail and Thunderbird) and this search may be performed cross-account.

What is lacking, and Evolution had it (for more information about my frustration read here), is a folder that collect all emails the searches didn’t match.

I’m sick to explain to every people who tell me “I have evolution and it works” so this is my situation: I have to manage about 4 email account and a lot of old local emails. I usually use IMAP. I use about 30 virtual folders and I receive about 150/200 email every day (this number depends of days and of how many mailing lists I subscribed).

Update 15/01/2009@21:46 I have to say that last Evolution minor release (2.24.3) is really better. Less noisy bugs, less crashes. Unmatched folder feature is still missing, but I think developers understand that is important and they will try to get it back in next major release. I hope also zimbra-plugin mantainer take care of bug I opened because I can’t use my online zimbra calendar.

About these ads

How to OpenVPN over Proxy

Sometimes there are places where is impossible to reach to internet without pass through a proxy. Using proxy is problematic because usually is impossible to read mail or use chat, irc and any application which work on a port different from 80 or 443.

This how to should work on most of the cases, unless the proxy policy is too restrictive.

Basically, the idea is to use the main connections to all the application which support proxy and are simple to configure and a customized route only for services that can’t pass thought a proxy.

Server

Openvpn uses default port 1194 (TCP or UDP), to pass over a proxy you must use the 443 port. I suggest to leave default openvpn port and apply a prerouting rule on iptables which map the 443 port on 1194:

iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 443 -j DNAT --to-destination 192.168.10.127:1194

Let’s start to configure openvpn service.

First of all you must read this official howto section to understand how to generate certificate (there are a lot of scripts and sample configuratino files shipped with openvpn package); you can also modify and use my configuration file.
Here my server configuration file:

mode server
local 192.168.10.127
;port 443
proto tcp
dev tun
ca keys/ca.crt
cert keys/server.crt
key keys/server.key # This file should be kept secret
dh keys/dh2048.pem
server 10.8.0.0 255.255.255.0
push "route 192.168.10.0 255.255.255.0"
keepalive 10 120
tls-auth keys/ta.key 0 # This file is secret
cipher AES-128-CBC # AES
comp-lzo
user nobody
group nobody
persist-key
persist-tun
verb 5
mute 20

I stored my certificates into /etc/openvpn/keys and my openvpn configuration file into /etc/openvpn.
I want to spend just few words about network configuration:

  • 192.168.10.0/24 is my home network (192.168.10.127 is my server network address)
  • 192.168.x.x/x is network I’m connected with client
  • 10.8.0.0/24 is the tunnel network

Client

Here a basic configuration (you can find a well explained file into sample configuration openvpn files):

client
dev tun
proto tcp-client
remote public_ip_address 443 #Public ip address of your home network
resolv-retry infinite
nobind
persist-key
persist-tun
cipher AES-128-CBC
ca "/etc/openvpn/keys/home/ca.crt"
cert "/etc/openvpn/keys/home/client1.crt"
key "/etc/openvpn/keys/home/client1.key"
tls-auth "/etc/openvpn/keys/home/ta.key" 1
comp-lzo
verb 5
http-proxy proxy.ras 80 passwd_file basic
#http-proxy-retry
http-proxy-option AGENT Mozilla/5.0+(Windows;+U;+Windows+NT+5.0;+en-GB;+rv:1.7.6)+Gecko/20050226+Firefox/1.0.1

I will not explain about keys and certificates here because openvpn how to give you a good explanation about it.
If your proxy need authentication, you must put proxy username and proxy password into your passwd_file, respectly on first and second line.

Now, you can start openvpn on server (service start openvpn).
Then you have to start openvpn on client. If you pass through a proxy, services can return you a FAILED, in this case, you should check /var/log/messages to get information about it.

If you got something like:

Initialization Sequence Completed

the tunnel is started. To verify that it work, just try to ping other tunnel part.

Natting and fowarding
Now is necessary to enable NAT and forward on your openvpn server, to allow certain flows, forwarded througt your vpn can reach internet by passing on your home router.

Just apply this few rules:

/bin/echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -i tun0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j MASQUERADE

now the server configuration is done.

Now we have to create static routes:

route add -host ip_you_want_to_staticize gw your_vpn_tunnel_address

for example: jabber, you have to retrieve your jabber server ip address, and insert into route command.as “ip_you_want_to_staticize”.

If you don’t have a dns into your subnet, to maintain transparency in applications, is better to use /etc/hosts to map every ip address to his name.

I’m using vpn only for jabber and email, I want to use also mugshot but it doesn’t work…dunno why.

Thanks to Kiwi to help me.

This post is under construction…so If you have suggestion or any issue to propose me, don’t hesitate to tell me.

NSS@System (26-27 Novembre – Pisa)

Con un po’ di ritardo ecco che arriva il resoconto di questa “due giorni” al “net & system security”, una serie di conferenze sulla sicurezza informatica, organizzata da bitflow e @system, rispettivamente azienda (fondata da un ex-studente) e associazione studentesca. La manifestazione si è tenuta a Pisa, al centro convegni.

Il mio viaggio inizia il 26 pomeriggio, in particolare alle ore 15.01, partenza da Lodi, arrivo previsto, ore 19:30 (@_@), cambi a Piacenza e Firenze. Il problema di pisa è appunto questo, raggiungerla è impresa assai ardua per gente delle nostre parti, perché è fuori dalla linea Milano – Bologna – Firenze, quindi i treni diretti sono pochissimi (1 o forse 2).

Son partito il 26 perché ho trovato ospitalità presso alcuni studenti dell’università di pisa, conosciuti via internet (LOL) i quali ringrazio ancora (in particolare Orontobate che mi ha offerto ospitalità) ;-)

Il viaggio è andato bene, non ci sono stati intoppi, a parte l’Intercity che emanava un fetido odore di plastica bruciata, ogni volta che frenava (l’ho sempre sostenuto che gli intercity fanno pena e lo sostengo tutt’ora :P , sono un bel modo per fare pagare tanto un servizio che vale poco poco, viva i treni regionali ;-) ). Ad ogni modo, sono arrivato puntuale a Pisa e…

…ho trovato la nebbia :D

Dopo varie peripezie (google maps puppa) per raggiungere gli altri ragazzi al centro convegni (dove stavano finendo i preparativi finali), ci siamo conosciuti e siamo andati a mangiare :-P Siamo andati in un pub (l’”orzo bruno” per chi è a pisa e non sa dove andare a bere :D ), ho conosciuto il mitico Praise (un hacker per definizione), e mi son gustato una birra fantastica (che fanno solo li :-Q_____).

Dopo il birroccio si è fatto un giro in centro, devo dire che Pisa assomiglia molto a Pavia, solo che mi sembra più viva e più concentrata nel centro, al contrario di Pavia che non ha una percentuale così alta di studenti rispetto alla totalità della cittadinanza.

Stavamo per andare a casa (io, orontobate e comic) e mi hanno proposto di vedere la torre di Pisa (la foto è mossa, ma è la meno mossa della serie, del resto senza cavalletto e senza appoggi, fare le foto di notte senza flash che non vengano mosse è parecchio difficile).

Poi, una volta a casa si è dormito (…zZz…)

Il giorno 27, sveglia circa alle 6:00 perché sia orotobate che comic, avevano appuntamento sul presto, al centro congressi, per iniziare la preparazione dell’infrastruttura di accoglienza visitatori (come si sa…murphy è sempre li dietro…pronto a intervenire :P ).

Ecco l’arno alle 7:30 di mattina….

Due parole sugli stand.

C’erano diversi stand, tra cui grandi Aziende: Sun, IBM, Nokia, Microsoft, e devo dire che le migliori sono state Microsoft e Nokia: avevano come stend-iste due gran fi***…. (Mi spiace per nokia ma io preferivo quella di Microsoft [ovvio che preferisco la mia morosa...eh ;-) ma era cosi per dire] :þ).

Ed ora parliamo dei talk ;-)

La giornata è iniziata bene, come primo talk c’era Marco Misitano di Cisco System che ha fatto un’analisi dell’attuale stato della sicurezza, di come si investa poco e, soprattutto si investe poco nelle competenze.

Molto meno formale e più divertente è il secondo talk di Andrea “Pila” Ghirardini di PSS che ha raccontato cosa succede in ambito forense e quali problematiche si devono affrontare. Le storie di vita vissuta sono favolose.Le trovate sulle slide dell’evento, ma dal vivo, vi assicuro sono qualcosa di spettacolare (mi ricordava pistolazzi di zelig :D (è un compilemento..eh ;-) )).

Ed ecco il coffee break ;-)

A metà mattinata ho poi seguito “hardening di apache” e ho capito quanto le configurazioni di default di apache, php, e php stesso puppino alla grande. Ad ogni modo ho avuto la possibilità di conoscere sikurezza.org e di iscrivermi alla loro mailing list ;-)

Ho dato finalmente un volto a Leofire (il link è giusto? :P ). Nel pomeriggio ho cercato di sistemargli la quotatura…ma Microsoft Outlook ha delle opzioni un po’ indecifrabili :D

Per terminare in bellezza la mattinata c’è stato il talk di Alessio L.R. Pennasilico (aka Mayhem) che ha parlato di voip hacking. Devo dire che il personaggio merita merita merita. ha parlato in modo semplice e soprattutto divertente, narrando storie di hackmeeting in cui hanno trovato un modo rapido e veloce di organizzare feste, semplicemente usando il voip. Per finire, ha mostrato e usato il suo aggeggio per modificare la voce e far sembrare la voce, una voce da donna :D (ROTFL)…

Pranzo in università: panino + acqua naturale 0.5l, costo: 1.25 euro (!!!NON ho sbagliato a scrivere!!!), putroppo non mi son ricordato di fare la foto allo scontrino..prima di darlo alla cameriera, uff :)

Dopo pranzo c’è stato la tavola rotonda su certificazioni e preparazione universitaria, tenuto da Marco Misitano (AIPSI, Cisco Systems), Massimo Agrelli (AIPSI, Microsoft), Prof Fabrizio Baiardi (Dip di Informatica, Universita’ di Pisa), Prof Giuseppe Cinque (Dipartimento di ingegneria Informatica, Elettronica e Telecomunicazione, Universita’ di Pisa / Consorzio Elis) molto interessante, soprattutto non solo attraverso confronti tra università e certificazioni, ma anche all’interno delle certificazioni stesse (vendor dependent e independent).

Successivamente ho conosciuto finalmente Arbiter, prode teammate del clan della birra. Mi spiace di aver iniziato ad usare kde, avrei voluto flammare alla grande :D :D sarà per un’altra volta :D

Nel pomeriggio ho seguito molto meno, putroppo ho scelto (mannaggia la scelta :P ) la serie di talks sbagliata. che aggiunta al pranzo appena fatto e alle poche ore di sonno mi hanno sbarellato :P

A parte gli scherzi, hanno parlato: Marco Misitano (Cisco System) ha esposto delle tecniche di packet filtering (che non mi pareva niente di particolare), Stefano Zucconi (Telecom) ha parlato di un sistema fatto da loro, e, mi spiace, ma non ho seguito praticamente il talk causa palpebra calante :P e Matteo “fusys” Falsetti ha parlato di Metasploit, un sistema innovativo di penetration test, molto interessante.

Il call for paper previsto dopo non l’ho seguito. Son dovuto scappare per prendere il treno delle 19:09, preso per il pelo grazie al mio senso di orientamento che stava nella valigia :D

Devo dire che mi son divertito molto, oltre ad aver seguito molti talk interessanti. Ammiro molto Pisa e la grande quantità di ingegneri mi hanno fatto sentire come a casa…altro che Pavia, dove la maggior parte non sa nemmeno che quando lo schermo è nero e il pc è acceso, deve muovere il mouse (Vi assicuro che è successo, una volta…ma è successo!!):

W Ingegneria informatica!!!!!!

Ad ogni modo, ringrazio tutti e dico un arrivederci, sperando di incontrarci, magari a Febbraio 2008 a Milano (hihihi, stavolta venite voi :P ) a Inforsecurity 08.

Ho scritto questo articolo in 3 giorni :P e non ho riletto (giustamente)..quindi se trovate vaccate…è normale :D

Update 11/12/07@11:37 Le slide del convegno sono disponibili, le trovate alla pagina del programma. ;-)

ebay e i furti :þ :þ

<_Spider_> parlatemi con serieta vi supplico
<peoro> spesso chi vende su ebay lo fa solo per avere l’indirizzo del compratore e poi andare a casa sua a derubarlo
<_Spider_> O,o
<_Spider_> nu, allora non compro
<_Spider_> thx
<_Spider_> :*
<Canduz> ma lol
<_Spider_> Canduz è più incomprensibile dei geroglifici….
<_Spider_> Nu, ti vuoi spiegare bene?
<Canduz> uh?
<_Spider_> pecche ma lol
<_Spider_> mi sembra che peoro abbia parlato seriamente…
<Canduz> bho cosi
<Canduz> nn so cosa scrivere
<_Spider_> O_O
<peoro> se mai comprerai su ebay
<peoro> ricordati di non dare MAI dati su di te
<peoro> e su quelli che proprio devi dare (tipo l’indirizzo)
<peoro> cerca d’essere vago
<peoro> non dirgli tipo: domani non posso venire a prenderlo perche’ non sono in casa
<peoro> se no lui lo sa e domani ti viene in casa
<_Spider_> ok
<_Spider_> faro cm dici
<_Spider_> asc
<_Spider_> ma per la spedizione a casa
<_Spider_> bisogna dare ‘indirizzo completo
<_Spider_> cm faccio?
<Canduz> tipo: lascia il pacco nel secondo cespuglio a destra davanti alla pizzeria
<Canduz> poi lo vai a prendere
<_Spider_> ok
<_Spider_> giusto, posso dargli appuntamento in un posto ke nn e casa mia
<_Spider_> prendo il pacco e torno a casa
<_Spider_> giusto
<_Spider_> grazie veramente, su di voi si puo contare

GmailFS installing and configuration (Fedora 7)

Disclaimer: Don’t trust gmail storage disk. Is possibile to lose all store data or get your account blocked (if you copy too much data, eg 100mb). Use it only to have fun or testing. If you wanna do backup, don’t store sensible data (is Google..remember) or be sure to have another backup.

GmailFS is a virtual filesystem (developed by Richard Jones) that permit you to mount your gmail box as an external hard drive. Is usefull for small backups similar to NFS.
Let’s start to install and configure GmailFS. I suppose here that you have a gmail address (if not, go here).

Packages need to be installed:
- python 2.3
- fuse
- libgmail (you can found here packaged by Ville SkyttĂ)
- fuse python bind (watch my (temporary) repository)
- gmailfs (watch my (temporary) repository)

After downloaded and installed all my packets, if your pc don’t crash, we can go ahead and configure gmailfs.

Add a line about gmailfs to your /etc/fstab as explain in the official project site: usr/local/bin/gmailfs.py /path/of/mount/point gmailfs noauto,user 0 0

If you want to access to your storage gmail disk with root user, you have to modify the configuration file /etc/gmailfs.conf adding username, password and disk name (disk name must be something difficult to guess to avoid someone can mess up your email).

To mount, simply use (as root):
mount /mnt/path/of/mount/point

If something go wrong, you can find log files in ~/gmailfs.log. Remember also if you need to use proxy configuration, you need appropriate ssl packages (eg. pythong-openssl) to use it.

To mount partition as normal user, you need to create a file similar to /etc/gmailfs.conf in your home and call it .gmailf (~/.gmailfs).
After that, you have to modify permission of mount point:
chown root:fuse /mnt/path/of/mount/point
chmod 775 /mnt/path/of/mount/point

Now you need to add your user to fuse group (I used administrator panel of GNOME). After that exit and log-in again, you should be able to mount fuse partition, using:

mount /mnt/path/of/mount/point

For information, correction, error and so on….use comments :-P

Update 01/10/2007@00:29  I have problems to unmount device from normal users. I get this error “unmount: /mnt/backup mount disagrees with the fstab”.

This, because when mtab is written, is different from fstab. I try to modify manually mtab but mtab change when a new partition is added, so is better to use root to unmount.


Simple & Easy NAT between wifi and eth

Sometimes happen the same situation: one ethernet port, one ethernet cable, no hub/switch and many PCs with wireless.
A good solution is to connect a pc with ethernet and create a WLAN (ad hoc or infrastructure) to connect other PCs to internet.
Too many time I had this problem and the solution is always the same or similar, so I wrote this useful and reusable bash script to configure wifi card (chipset Atheros with madwifi driver) and create a NAT to connect AdHoc WLAN.


#!/bin/bash
# inizializing ethernet (I suppose outer network have address 193.205.22.12)
# I suggest to disable NetworkManager and kill dhclient
ifconfig eth0 193.205.22.12

# Now I need to unload and reload module with option "autocreate=adhoc". This
# simplify the creation of virttual interfaces athX (See how madwifi work for more informations)
/sbin/rmmod ath_pci
modprobe ath_pci autocreate=adhoc


# Configuring essid (In this case I use essid "spongepowa"
iwconfig ath0 essid spongepowa
# Configuring WLAN address (I suppose my network is 192.168.1.0/24)
ifconfig ath0 192.168.1.1

# Enabling forwarding
/bin/echo "1" > /proc/sys/net/ipv4/ip_forward

# Inizializing iptables
iptables --flush
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P PREROUTING ACCEPT

# Making rules:
# - 192.168.1.0/24 is local WLAN addresses
# - eth0 is the output interface (ethernet interface), ath0 is the input interface (wifi interface)
iptables -A FORWARD -s 192.168.1.0/24 -d 0/0 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -d 192.168.1.0/24 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.0/24 -j MASQUERADE

I hope this is correct. If you have any question ask me by comment.

If my english is full of mistakes, tell me (AYBABTU is not allowed without motivation :þ)…with my mistakes, of course.

togliere i thread per soggetto con Thunderbird

Dopo aver abbandonato thunderbird per questo fastidioso problema, ora che sono obbligato ad usarlo (tra i programmi a mia disposizione è quello più completo e funzionale) ho deciso tentare di risolverlo.

Quale è il problema? Attualmente uso i thread per leggere la posta, in quanto risulta comodo per tenere traccia delle varie discussioni. Normalmente il client di posta, per “capire”, quando una mail fa o meno parte di una discussione, usa il campo Reference (secondo gli standard RFC, al contrario della maggior parte degli ^Outlook [Ee][xpress]{0-1}$)).

BTW, Thunderbird non guarda solo quel campo per decidere se aggregare una mail sotto lo stesso thread, ma guarda (anche) il soggetto, quindi se mi arrivano due email completamente diverse con lo stesso soggetto finiscono sotto lo stesso thread. La cosa mi da noie.

Ora per risolvere il problema è necessario per chi usa thunderbird 1.5, installare l’estensione about:config, e andare in quelle opzioni, (chi usa thunderbird 2 ci arriva in questo modo: edit-> preferences-> advances -> advanced options) e cercare “thread”, poi mettere a true l’opzione:

mail.strict_threading

riavviate thunderbird e il problema è risolto.
Qui linko anche una guida dove ci sono spiegazioni aggiuntive.