# uname -a

mercredi 21 octobre 2015

Configure dibbler-client for IPV6 networking on Dedibox (or any Online.net) servers with Debian 8 (Jessie)

The Online documentation for IPv6 is not dealing with the case of Debian 8, Ubuntu, or any distribution using systemd. Systemd replaces upstart, so the procedure has to be extended to add systemd service for startup, replacing the previoux behavior that was using init scripts.

Ensure that you are IPv6-proof

It should be the case as Debian 8 is shipping a kernel with native IPv6, but just to be sure :

In /etc/modprobe.d/local.conf :

options ipv6 disable=0

In /etc/modules :

ipv6

You may have to reboot in order to apply the changes.

Set up your IPv6 prefix and get your DUID on Online console

You have to request IPv6 activation to support and create your /64 on Online console before getting your DUID working.

Make a /64 and do not use your /48 or your /56 directly, as you may regret it. You can have only one /48 by account, one /56 by server, and one /64 by IP failover (the /48 is divided to make the /56 and so on).

Configure your network interface

It may not be mandatory as Dibbler will reconfigure your interface, but you have to ensure that you accept router advertisements. Add to /etc/network/interfaces :

iface eth0 inet6 static
    address your_ipv6_address
    netmask 64
    accept_ra 2

Notes about Proxmox and forwarding

On Proxmox, you are working on the bridge interface, it should be vmbr0 instead of eth0.

If you enabled forwarding on this interface (to give your VM an access to IPv6 network), you have to force the accept_ra to 2, while the default value of 1 wil make your Debian to ignore router advertisements when forwarding is enabled ! Read more. Add to sysctl.conf :

net.ipv6.conf.vmbr0.accept_ra = 2

Also do not set the IPv6 interface of your VM to vmbr0, as you can break your network access. Read more.

Compile and install Dibbler

  • Download Dibbler 1.0.1 from the offical website.
  • Install build-essential : apt-get install build-essential
  • Extract Dibbler : tar -xzf dibbler-1.0.1.tar.gz && cd dibbler-1.0.1
  • Compile and install Dibbler : ./configure && ./make

Configure Dibbler

Make the directories and set up according to the documentation :

Set up duid :

mkdir /var/lib/dibbler/
touch /var/lib/dibbler/client-duid
chmod 640 /var/lib/client-duid
# Set up you duid in client-duid
vim /var/lib/client-duid

Set up client.conf :

mkdir /etc/dibbler
vim /etc/dibbler/client.conf

The content of my client.conf :

auth-protocol reconfigure-key
auth-replay monotonic
auth-methods digest-hmac-md5
duid-type duid-ll
inactive-mode
log-level 8
iface eth0 {
    pd
    ia
}

Note that if your interface name is different you have to change it accordingly. For instance, on a Proxmox host server, it should be vmbr0 instead of eth0.

Start dibbler to try the connectivity :

dibbler-client run

Hit CTRL+Z to suspend the process and check that the IP and routes are configured. Type the command “fg” to get back to the running process and hit CTRL+C to stop it.

If it doesn’t work, check your firewall, dibbler needs to listen port 546 UDP.

Set Dibbler at startup

This section differs from Online documentation.

Before systemd, the dependency-based boot sequence only needed an init script, for instance /etc/init.d/dibbler . With systemd, you have to make a service file in /etc/systemd/system/ .

Make the following file : /etc/systemd/system/dibbler.service :

[Unit]
Description=Dibbler
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/sbin/dibbler-client start
ExecStop=/usr/local/sbin/dibbler-client stop
PrivateTmp=true
NonBlocking=yes

[Install]
WantedBy=multi-user.target

Run the following command to make systemd read file :

systemctl daemon-reload

Enable the service :

systemctl enable dibbler.service

And then, try to start it :

systemctl start dibbler.service

Check everything is fine :

service dibbler status
ifconfig
route -6
ping6 whatever-you-want.com

Reboot and the IPv6 networking should work at startup ! :)

Addendum : just in case, don’t use resolvconf with IPv6 DNS pushing and if possible keep IPv4 DNS, it would be such a pity if the IPv6 networking crashes while your DNS servers are set to IPv6 addresses (yeah, it happened to to me)…

Sources

samedi 17 octobre 2015

Un dotclear vous manque et tout est dépeuplé

Aujourd’hui je n’arrivais pas à accéder au panel d’administration de mon Dotclear aujourd’hui. Après avoir rentré le bon mot de passe, La page tournait en boucle pour terminer sur une erreur 500.

Le blog fonctionnait toujours et toutes les autres pages utilisant PHP n’afichaient aucun problème.

Dans les logs Apache, j’avais :

mod_fcgid: read data timeout in 40 seconds
End of script output before headers: index.php
mod_fcgid: process 3114 graceful kill fail, sending SIGKILL

Aucun processus n’était à 100% de CPU, la BDD était au repos, le processus PHP semblait se “figer” au moment d’ouvrir la page d’administration.

Le site de Dotclear était down lui aussi. Coincidence ?

Juste pour voir, j’ai rajouté dans le fichier host de mon serveur la ligne suivante :

127.0.0.1    download.dotclear.org

Après avoir relancé Apache, l’administration s’est mise à fonctionner !

Ce n’était donc pas une coincidence, si Dotclear essaie de recherche ses mises à jour alors que le site download.dotclear.org est en panne (pour des causes naturelles ou non), le panel d’administration reste en attente d’une connexion et on ne peut plus s’y connecter. Évidemment, plus on raffraichit la page, plus on tape sur ce pauvre serveur de Dotclear.

heavy-mallet.gif

 

Pour ceux qui n’ont pas accès à leur serveur, vous pouvez changer l’URL de DC_UPDATE_URL dans le fichier inc/prepend.php pour le faire pointer ailleurs, temporairement :

define('DC_UPDATE_URL','http://download.dotclear.org/versions.xml');

N’oubliez pas de le remettre comme avant une fois le site download.dotclear.org réparé, sinon vous n’aurez plus jamais de mises à jour automatiques ;)


Mise à jour : à priori, il y a aussi les flux RSS qui s’affichent sur le côté de l’admin qui sont aussi à désactiver, j’ai fais un gros patch dans le fichier admin/index.php pour finir par faire marcher l’administration :

--- admin/index.php    2015-10-17 19:58:19.873121948 +0200
+++ admin/index.php    2015-10-17 19:58:08.713227238 +0200
@@ -80,6 +80,7 @@
 $favs = $core->favs->getUserFavorites();
 $core->favs->appendDashboardIcons($__dashboard_icons);
 
+/*
 # Check plugins and themes update from repository
 function dc_check_store_update($mod, $url, $img, $icon)
 {
@@ -165,7 +166,7 @@
 }
 
 $core->callBehavior('adminDashboardItems', $core, $__dashboard_items);
-
+*/
 # Dashboard content
 $dashboardContents = '';
 $__dashboard_contents = new ArrayObject(array(new ArrayObject,new ArrayObject));

jeudi 1 octobre 2015

About ToBeHost : the last of my student's projects

Hello there, this is not your ordinary reading on this blog. This post is a sort of introduction for a series of posts about the making of a free web hosting provider, implementing a web panel from scratch using Drupal for front-end and Puppet as back-end.

But first, let me introduce you the reason why we started the project. I said “we” because I am not the only one in the boat, but it’s me who will make all the technical choices, and implement it. I am also the one who was saying “give up” to my colleague a few months ago, before going back with this new and exciting crazy idea.

Lire la suite...

mercredi 30 septembre 2015

STOP aux adresses gmail, yahoo, hotmail dans les communications professionnelles

Ceci est juste un billet d’humeur sur quelque chose que je trouve de plus en plus exaspérant : la recrudescence des aderses Gmail, Yahoo, ou Microsoft dans des emails soit-disant sérieux, professionnels, etc.

PME, syndicats, gouvernements, fédérations politiques, arrêtez d’utiliser des fournisseurs d’emails grand public, et assumez votre marque ! Vous ne voudriez pas avoir la publicité de votre imprimeur au verso de tous vos tracts ? Alors ne faites pas pareil avec les mails.

Donc NON, ce n’est pas acceptable, à part si vous êtes un particulier, d’avoir une adresse mail en @gmail.com, @yahoo.com ou @outlook.com. En faisant cela vous démontrez :

  • Votre méconnaissance et/ou votre amateurisme le plus total dans l’utilisation des NTIC.
  • Qu’aucun de vos amis, agences de com, ou conseillers n’a de connaissances solides sur le sujet (ça fait flipper hein ?).
  • Que vous aimez tellement les américains que vous êtes prêt à leur transmettre tous vos emails.
  • Que vous êtes radin au point de ne pas dépenser les 30 euros nécessaires pour obtenir un nom de domaine et une boîte mail chez un registrar.

Avoir une adresse contact@monentreprise.com c’est compliqué ? Non, ça prend 20 minutes maximum pour peu que vous sachiez comment s’appelle votre entreprise.

En bonus, le mail que j’ai reçu ce matin :

wtf-service-civique.png

Bordel de merde.

samedi 29 août 2015

Postfix : configure postmaster, hostmaster, and abuse catchall for RFC compliance

This short howto will show you how to set up a catchall for common required email addresses. Some mail servers are testing if mail is accepted on this addresses to detect spammymail servers. Hostmaster address can also be used for domain Trading, to check the ownership of the domain.

1. Create a file named /etc/postfix/regexp-catchall.cf with the following content:

# Catchall to comply with RFC standards
/^postmaster@/    youshouldreadit@mydomain.com
/^hostmaster@/    youshouldreadit@mydomain.com
/^abuse@/         youshouldreadit@mydomain.com

Replace youshouldreadit@mydomain.com with a mail address you actually read.

2. Open /etc/postfix/main.cf and locate (or create) the line virtual_alias_maps, and add at the end regexp:/etc/postfix/regexp-catchall.cf, for instance:

virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, regexp:/etc/postfix/regexp-catchall.cf

3. Restart Postfix.

Warning : read comment #4 for issues with this setup.

- page 8 de 32 -