Problemi raggiungibilità php-fusion.it

Update 30/03/10: php-fusion.it è nuovamente online dopo due LAR perse in maniera imbarazzante (numero di telefono errato anche se inviato a quello corretto, la seconda andata completamente persa)

Update 23/03/10:
Ho dovuto rimandare il fax stamani perchè quello di sabato è stato rifiutato per uno dei soliti errori casuali (firma non leggibile, numero errato, saturno in terza casa), quindi ci saranno almeno altre 48 ore di down :(

A causa di un disguido tecnico (cioè io che mi dimentico di controllare che la richiesta di cambio MNT fosse andata a buon fine), PHP-Fusion.it è al momento non raggiungibile.
Mi scuso per il disagio, e spero che sia la prima e ultima volta, visto che con la nuova registrazione sincronia dei domini .it (come già  funziona da anni in tutti i paesi civilizzati) non ci sarà  più bisogno di utilizzare quel mezzo per l’invio di documenti adoperato nel millennio scorso, conosciuto anche come ‘fax’, per registrare e modificare lo stato dei propri domini.

Ho creato un hostname temporaneo se qualcuno avesse bisogno di accedere: http://pf.scorpionworld.it/

Posted in News, it_IT | Tagged | Comments Off

HowTo Install EmDebian Grip (deboostrap)

For installing Emdebian grip on a flash or USB drive (ext2 or greater required):

mkdir /media/grip/
mount /dev/sdc1 /media/grip/
sudo debootstrap lenny /media/grip/ http://www.emdebian.org/grip/
cd /media/grip/
mount -o bind /dev/ dev/
mount -o bind /proc proc/
chroot . /bin/bash
aptitude update
aptitude install linux-image-2.6.28-1-686 initramfs-tools
aptitude install what-you-want
aptitude install grub
grub-install /dev/sdc
update-grub
exit
umount dev/
umount proc/
cd ../
umount grip/

Now you have a bootable EmDebian Grip install (less than ~80 Mb required)

When installing a kernel, an error may appear:

Running depmod.
Running update-initramfs.
Error retreiving answer for linux-image-2.6.28-1-686/postinst/create-kimage-link-2.6.28-1-686: Unsupported command "update-initramfs:" (full line was "update-initramfs: Generating /boot/initrd.img-2.6.28-1-686") received from confmodule. at /var/lib/dpkg/info/linux-image-2.6.28-1-686.postinst line 671,  line 3.
dpkg: error processing linux-image-2.6.28-1-686 (--configure):
subprocess post-installation script returned error exit status 128
Errors were encountered while processing:
linux-image-2.6.28-1-686

For fixing it, insert in /etc/kernel-img.conf:

do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no
postinst_hook = update-grub
postrm_hook   = update-grub
Posted in Debian, en_US | Tagged , , | Comments Off

Some notes about configuring RAID10, LVM, KVM and virt-manager on a Debian Lenny server

Recently I’ve achieved a good setup for a virtualized environment, using Debian Lenny as host, with a RAID10, and LVM for managing VM disk images.

The server was a:
CPU Intel Xeon X3430
RAM 4GB
HD 4x500GB

During the installation, on each of the 4 disks, I created:
- a small /boot partition (~300Mb)
- 10 Gb RAID1 for /
- 1 Gb RAID10 for swap
- remaining space as RAID10, with a big LVM volume on top of it.

Please note: at the end of the installation, you should manually install grub on every disk, because if the first disk get destroyed, you cannot boot your system.

mkdir /boot2 /boot3 /boot4
mount /dev/sdb1 /boot2
mount /dev/sdc1 /boot3
mount /dev/sdd1 /boot4
rsync -av /boot/ /boot2/
rsync -av /boot/ /boot3/
rsync -av /boot/ /boot4/
umount /boot2/ /boot3/ /boot4/
dd if=/dev/sda of=/dev/sdb count=1 bs=512
dd if=/dev/sda of=/dev/sdc count=1 bs=512
dd if=/dev/sda of=/dev/sdd count=1 bs=512

At this point, installing kvm plus virt-manager is straightway:

aptitude install kvm libvirt-bin virt-manager

Remember that Lenny is getting pretty old, so for getting more from your server, you should use the backports.org packages.

Now add your user to the libvirt and kvm system groups (/etc/groups):

[..]
kvm:x:112:bob
libvirt:x:115:bob
[..]

At this point, you should connect to virt-manager GUI. As far as I understood, virt-manager support connections from remote hosts, but the TLS configuration is not so well documented, so you can simply do X11 forwarding or install a VNC server, or NX server, on the host to get the local virt-manager.

What I usually do on my lan from my laptop is:

ssh -X -l myuser myserver.local
virt-manager

And the virt-manager window will popup.

LVM Configuration
Edit->Host Details->Storage
Add your LVM Volume Group defined during the first setup: from this window, you can create virtual disks for your machines.
Using LVM instead of simple disk images give great benefits: less overhead, and the ability to expands images (and filesystems on it) without even rebooting the VM.

Network Configuration
You can use both bridged networks and private networks. Bridged networks are used when a VM should have the same subnet address of the other hosts on the local networks.

Bridged networks requires additional configuration on the host to work:

cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#allow-hotplug eth0
#iface eth0 inet static
#        address 192.168.0.4
#         netmask 255.255.255.0
#         gateway 192.168.0.1

auto br0
allow-hotplug br0
iface br0 inet static
         address 192.168.0.4
         netmask 255.255.255.0
         gateway 192.168.0.1
         bridge_ports eth0
         bridge_stp off
         bridge_maxwait 15

Private networks should be use to isolate the virtual machine from the physical networks. You can create a DMZ using strict iptables rules for allowing clients to reach VM inside a private network. You can take a look on the iptables scripts I am using on the host, that use both bridged and private networks.

cat firewall.sh
#! /bin/bash
# By Giovanni Toraldo

LAN='br0'
VLAN='virbr0'
SUBNET='192.168.0.0/24'
VSUBNET='192.168.122.0/24'

## FLUSH
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X

## Default Policy
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP

# Basic Routing/Forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A FORWARD -i lo -j ACCEPT

## Local Inbound Services
iptables -A INPUT -p tcp --dport 22 -j ACCEPT # ssh
iptables -A INPUT -p tcp --dport 25 -j ACCEPT # mail
iptables -A INPUT -p udp --dport 123 -j ACCEPT # ntp
iptables -A INPUT -p tcp --dport 80 -s $SUBNET -j ACCEPT # nginx

# VLAN - I accept and route all traffic
iptables -A INPUT -i $VLAN -j ACCEPT
iptables -A INPUT -i $LAN -j ACCEPT
iptables -A FORWARD -i $VLAN -j ACCEPT
iptables -A FORWARD -i $LAN -o $VLAN -j ACCEPT
# Masquerading packets from private networks only!!
iptables -t nat -A POSTROUTING -s $VSUBNET -o $LAN -j MASQUERADE
Posted in Debian, Software, en_US | Tagged , , , , , , | Comments Off

OpenVPN on a privileged port with an unprivileged user

Remember: if you are using a privileged port for your openvpn (<1024, like 53/udp for bypassing captive portals), don’t configure privilege dropping, otherwise after the first timeout, the vpn will die with “TCP/UDP: Socket bind failed on local address [undef]:port: Permission denied”

My static key server config (/etc/openvpn/ogre.conf):

dev tun
ifconfig 10.0.66.1 10.0.66.2
secret static.key
comp-lzo
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
# keep commented if using a privileged port
#user nobody
port 53
proto udp

The logfile of the failing openvpn:

Feb 28 09:48:37 ogre ovpn-ogre[6383]: OpenVPN 2.1_rc11 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Sep 18 2008
Feb 28 09:48:37 ogre ovpn-ogre[6383]: /usr/sbin/openvpn-vulnkey -q static.key
Feb 28 09:48:38 ogre ovpn-ogre[6383]: LZO compression initialized
Feb 28 09:48:38 ogre ovpn-ogre[6383]: TUN/TAP device tun0 opened
Feb 28 09:48:38 ogre ovpn-ogre[6383]: /sbin/ifconfig tun0 10.0.66.1 pointopoint 10.0.66.2 mtu 1500
Feb 28 09:48:38 ogre ovpn-ogre[6388]: UID set to nobody
Feb 28 09:48:38 ogre ovpn-ogre[6388]: UDPv4 link local (bound): [undef]:53
Feb 28 09:48:38 ogre ovpn-ogre[6388]: UDPv4 link remote: [undef]
Feb 28 09:48:47 ogre ovpn-ogre[6388]: Peer Connection Initiated with 79.47.206.122:62799
Feb 28 09:48:47 ogre ovpn-ogre[6388]: Initialization Sequence Completed
Feb 28 11:28:25 ogre ovpn-ogre[6388]: read UDPv4 [EHOSTUNREACH]: No route to host (code=113)
Feb 28 11:28:34 ogre ovpn-ogre[6388]: Inactivity timeout (--ping-restart), restarting
Feb 28 11:28:34 ogre ovpn-ogre[6388]: SIGUSR1[soft,ping-restart] received, process restarting
Feb 28 11:28:36 ogre ovpn-ogre[6388]: Re-using pre-shared static key
Feb 28 11:28:36 ogre ovpn-ogre[6388]: LZO compression initialized
Feb 28 11:28:36 ogre ovpn-ogre[6388]: TCP/UDP: Socket bind failed on local address [undef]:53: Permission denied
Feb 28 11:28:36 ogre ovpn-ogre[6388]: Exiting
Posted in Debian, Software, en_US | Tagged , , , | Comments Off

Frankness #1

(original) (via silentman)

Posted in null | Tagged , | Comments Off

IronMan MacBook Decal

MacBook Pro Iron Man Decal
Massiccio. O no?

Posted in Fun | Tagged , , , | Comments Off

DNS-323

Il DNS-323 è un NAS (disco di rete) di fascia bassa (170 euro senza dischi) con due slot SATA, l’ideale per mettere al sicuro (sempre relativamente parlando) i propri dati.

Purtroppo dispositivi del genere (ma anche router/modem/acess-point), nonostante siano dei bei pezzi d’hardware, nonostante siano basati su software GNU/Linux, nonostante sulla carta abbiano tantissime feature (SMB, NFS, FTP, UPNP, DAAP, Torrent), spesso si scopre che il software è una mezza ciofeca.

Perchè? Non lo so, non conosco nessuno che lavora in questo campo, ma mi piacerebbe approfondire. Il male più grosso, da quel che riesco a capire, è che i produttori usano sଠsoftware libero, ma sembra che siano totalmente incapaci a gestirlo: ogni nuovo dispositivo che sfornano, spesso significa un nuovo linux embedded ricostruito da zero (from scratch).

Il risultato? Passano l’80% del loro tempo a risolvere problemi che il resto del mondo ha affrontato una volta sola: ti ritrovi a combattere con l’interfaccia web che scombina la configurazione di samba e non funziona più, niente da fare per agganciare NFS su mac, ventole che girano a palla nonostante temperature sotto quella ambientale e infine, ciliegina sulla torna, non c’è versi di avere un cacchio di accesso shell per capire cosa diamine stia succedendo.

E questo è quello in cui sono incappato in un solo fine settimana di utilizzo approfondito.

Che fare? Opensource non è solo ‘software aggratis’, opensource è comunità , competenze e testardaggine. Questo dns323 wiki è un ottimo punto di partenza. Per i primi passi da muovere, consiglio questa paginetta Installare Telnet/Fun_Plug.

Quello che avrete (e che ho io in questo momento) è accesso ssh e un chroot con una serie di pacchetti di base pronti all’uso e altri già  installati.
Il prossimo passo per me è agganciare direttamente una bel chroot Debian ARM =D

Posted in Hardware, it_IT | Tagged , , , , , , | Comments Off

Buitoni Newsletter: FAIL.

Oggi, leggendo l’ennesima newsletter simil-spammona della Buitoni (potrei quasi negare sotto giuramento di essermici iscritto volontariamente), decido che potrebbe essere giunto il momento, nonostante il suo affetto dimostratomi negli anni, di effettuare la rimozione.

Click sul link nella mail ed eccomi catapultato sul sito buitoni alla ricerca del bottoncino “distruggimi”.

E di cosa mi accorgo?

Che la Buitoni mi ha piacevolmente autologgato con le credenziali di un altro utente.

Purtroppo, non vedo riferimenti a contatti email sul loro sito, se ne saranno mai resi conto?

Posted in News, it_IT | Tagged , , | 2 Comments

Una parecchio rapida introduzione a BluePrint (css framework)

Un amico mi ha chiesto delucidazioni su BluePrint, e mi sembra ne valga la pena di ripubblicare qui alcuni paragrafi con cui gli ho risposto.

> ho letto la guida e provato questo blueprint.. ma francamente non ho capito
> cosa dovrebbe fare!! ho visto che solo con i css riesce (in caso di stampa)
> ad aggiungere il path del link attraverso i CSS3, era questo che volevi
> farmi vedere?

Fa tante cose.

Ha un css che “resetta” i valori di default che ogni browser dà  ad alcune classi, cosଠhai una base di partenza unica su ogni browser. Ha un css con svariati hack per IE6/7, incluso il fix png (è comodo
perchè non devi ricordarti tu di metterlo a mano in qualsiasi lavoro che fai).

Il framework vero e proprio non sono altro che un insieme di classi già  incluse in questo blueprint che ti permettono di creare un layout come ti pare e piace senza scrivere una riga di css ma semplicemente
usando apposite classi (e qui vanno studiate nella documentazione).
Vedi ad esempio il codice html di http://www.blueprintcss.org/tests/parts/sample.html
Le classi che vengono usate in tutti i div sono dichiarate tutte all’interno del super-css di blueprint.

Poi anche per gli elementi, stesso discorso per il layout: http://www.blueprintcss.org/tests/parts/elements.html
Tutti già  pronti per esser usati!

Per i form, idem, son comodi anche per dargli un aspetto standard sui vari siti che fai: http://www.blueprintcss.org/tests/parts/forms.html

Siccome sei un grafico e sai il CSS, nulla ti vieta di estendere le classi di blueprint per esigenze particolari, il guadagno di un sistema del genere è che ti risparmi dallo scrivere l’infrastruttura CSS che magari tu ti sei già  fatto accumulando lavori in passato, ma sicuramente non è completa e mantenuta costantemente come questa.

Posted in Software, it_IT | Tagged , , | Comments Off

Disservizi di Register.it – [updated!]

Ci risiamo.

Che poi gli italiani ci tengono all’Italia, gli piacerebbe pagare aziende italiane fornitori di servizi eccellenti, ma davvero pare facciano di tutto per costringere la gente a migrare verso hosting provider tedeschi o americani.

Trovate una discussione interessante sul forum messo a disposizione da badwarebusters.org, dove negli ultimi 3 giorni si sono ritrovati a chiedere aiuto numerosi webmaster che si son ritrovati con il proprio sito abbuiato da Google in quanto rilevata presenza di malware sulle proprie pagine, senza nemmeno che ci fosse l’evidenza di una compromissione del proprio CMS (o almeno così per la maggior parte dei casi è stato).

Quando poi qualcuno si è accorto che tutte le richieste di aiuto delle ultime 48 ore erano relative domini ospitati su Register.it, è cominciato il divertimento.
Ad ogni utente che apriva un ticket per segnalare un problema, veniva detto che i server Register.it rispettano tutti gli standard di sicurezza.

Come al solito, la storia si è chiusa con un “non è colpa nostra, ma adesso è tutto apposto”.

Non capiranno mai che io preferisco sapere cosa succede prima, durante e dopo, che vengano riconosciute le proprie lacune, che ognuno si impegni per far sì che il problema non si ripeta.

È così difficile?

UPDATE!
Oggi (21/12/2009) è arrivata una risposta ufficiante da Register.it, che trovate sempre nella solita discussione sopra citata.

Mi posso rimangiare la parte sulla trasparenza (anche se in ritardo di 4 giorni).
Non posso però transigere sulla Sicurezza.

Inviterei i tecnici che si occupano della gestione dell’infrastruttura di Register, a dare un occhio a mpm-itk, mpm-peruser, php-fpm, suphp, suexec o quant’altro serve per arrivare allo scopo dell’evitare il “tibucounochetibucotutti” (anche un bel chroot è sufficiente).

Posted in News, it_IT | Tagged , , | Comments Off