Blog hébergé par Yves et Iris :-)

Aller au contenu | Aller au menu | Aller à la recherche

jeudi 20 avril 2017

Git is available again

When I setup gitolite on my server for Git access through SSH, of course I did test that cloning worked from outside my network. That was for my Paperweb project.

Later I configured port-knocking on the server to get rid of bot-based authentication attempts that were polluting my log files. Unfortunately, at this time, the “outside” server on which I have an account was down, so I could not leave my network to check that all was fine; from the inside of the network, all worked like a charm, though!

Same situation when someone asked me for the Paperweb code by e-mail because they could not get it the normal Git way. I had no idea that port-knocking was the problem: from my side of the firewall, all worked correctly…

Lire la suite...

dimanche 20 novembre 2016

Bootable flash drive for both Linux and Windows: live Linux

Three years ago, I wrote a small series about having all my favourite tools on a USB flash drive when I am on the go. Some things have changed in these years, so the time has come to write fresh blog posts on the subject. My main aim is a full portable Linux OS, and this third part is about just that!

Lire la suite...

Bootable flash drive for both Linux and Windows: boot loader

The following text is the second part of a reboot —as they say for films, now— of my 3-year-old series about having a universal Linux and Windows toolbox on a bootable USB flash drive. The main target is a full portable Linux OS, but I will also address the Windows OS, for those times when you have no choice ;-)

This part is about the boot loader and miscellaneous tools accessible from there.

Lire la suite...

vendredi 18 novembre 2016

Bootable flash drive for both Linux and Windows: BIOS and EFI

This is a new take on my 3-year-old series on the same subject, with the aim of having a portable toolbox for anything PC, from booting Linux, to having my favourite productivity tools at all time, to being able to rescue a broken disk or OS, and so on. This toolbox takes the form of a standard USB flash drive, made bootable and filled with all that I need, yet still uncluttered, and usable as any USB flash drive for transferring data.

This first article is about the “bootable” part.

Lire la suite...

samedi 24 septembre 2016

Import an old mbox file into Thunderbird

I tried to import an old e-mail file from year 2000 or so, using Thunderbird’s ImportExportTools extension. And it failed. I first tried to split the mbox file, but eventually I found that X-Mozilla… headers were at fault! So, the solution is simply to run this command on the file before importing it in Thunderbird:

sed -i.bak '/^X-Mozilla/d' MboxFile

In case someone is interested, here is how I could split the mbox file into multiple eml files:

mkdir files.eml
awk '
BEGIN {f=0; o=""}
function new() {if (f!=0) close(o); f=f+1; o=sprintf("files.eml/%d.eml",f)}
/^From - / {new(); next}
/^X-Mozilla/ {next}
{print >>o}
END {new()}' MboxFile

This worked because each e-mail in my mbox file started with a « From - … » line. I’m not sure this is a universal rule, however.

mardi 13 septembre 2016

Vive le fairphone 2 !

Le Fairphone 2 est un excellent téléphone. Je ne savais trop comment présenter cette acquisition…

Quelqu’un l’a déjà fait, bien mieux que je ne saurais le faire. Allez-y, c’est très bien écrit :

samedi 10 septembre 2016

Baisse du volume sonore sur la théière riviera&bar Yunnan

Heureux possesseur d’une théière électrique riviera&bar Yunnan, je déplorais toutefois le volume strident de son alarme sonore, dont le rôle est d’informer l’utilisateur des différentes étapes : ébullition, infusion, maintien au chaud… Il suffit d’ailleurs de consulter la FAQ du fabriquant concernant cette théière pour s’en convaincre ; une seule question à ce jour : « Peut-on retirer les signaux sonores du produit ? »

C’était insupportable ; j’ai donc atténué le volume sonore de son « buzzer ».

Lire la suite...

mercredi 8 juin 2016

Light-weight port-knocking to protect SSH

A bit more than a year ago, I hardened my SSH server, which resulted in the near-disappearance of automated SSH login attempts. Alas, the script-kiddie tools have finally caught up with the current state of cryptography; or at least with the level of cryptography that I dare require, and still maintain compatibility with most devices that I use.

Fail2ban, although dormant all this time, still ran like the ever-vigilant Argos, and resumed its usual work as the attacks came back. But I do not like relying solely on fail2ban. So I decided to add port-knocking as a protection.

Lire la suite...

lundi 30 mai 2016

A new self-hosted home server

My ageing eSATA SheevaPlug is running a lot of tasks:

  • web, e-mail, and xmpp server;
  • database server;
  • NFS and DLNA (media) server;
  • sync server for contacts, calendars, files, and Firefox profiles (old protocol);
  • and various means of connecting remotely.

It is now running Debian Jessie, after having run Lenny, and then Wheezy, which shows just how long it’s been running, considering the long lifetime of a major Debian version :-D

With only a half-GB of RAM, it’s come to the point where swap is being used on a regular basis, although not too much so far. As for the processing power, everything works, albeit slowly; reasonably so… so far. And more importantly, anything more is impossible (eg. nice ownCloud modules, or a sound server…).

The time has come to plan a replacement, which is the subject of this post.

Lire la suite...

jeudi 21 janvier 2016

Command-line and Web Interface for Paperwork

I am very fortunate that one jflesch on GitHub decided one day to create Paperwork! This excellent program evolved very quickly and is still improving. I manage all my official documents, invoices, and such, in Paperwork. Scan by scan, PDF import by PDF import, I am slowly approaching the 2000 documents, or 5000 pages. This program has proved invaluable in the past year alone, both for speeding up the processing of new documents, and for looking for old documents.

Yet I miss one feature: the possibility to search the database of documents (which is on my home server) from any computer or mobile device, without having to launch Paperwork, which is only installed on the main family PC.

Besides, as I often connect to my server from distant places using OpenSSH, the possibility to do command-line searches would be a big improvement over my current use of find, grep, etc. Or I should rather say, my former use of find, grep, etc. Because…

Lire la suite...

dimanche 17 janvier 2016

Secure personnal backup in the Cloud(s) using Linux

Like everyone, I have important data on my computer. Like everyone, I have a backup (several, actually) of this important data —you do too, don’t you?— But while this backup is good enough in case I have a hardware failure, it won’t help me if my apartment gets flooded or catches fire. That’s because the data and its backup are stored in the same place. Several solutions exist.

Lire la suite...

samedi 16 janvier 2016

Extraire un tableau d’un PDF pour importer les données

J’ai recommencé à tenir mes comptes dans l’excellent GnuCash. Comme je n’ai pas le temps (ni l’envie) de tout saisir pour ensuite rapprocher les comptes, j’importe les données depuis les fichiers téléchargés sur Internet et je me contente d’affecter les revenus et dépenses, et vérifier que tout est normal.

Mais tous les organismes ne fournissent pas de fichiers directement exploitables. Beaucoup se contentent de fichiers PDF…

Lire la suite...

lundi 3 août 2015

Synchronisation de fichiers légère, pour ownCloud et WebDAV

J’ai récemment commencé à utiliser ownCloud pour la synchronisation de fichiers. En fin de compte, malgré quelques problèmes à la marge, l’expérience est vraiment satisfaisante, à tel point que j’ai déplacé sur ownCloud tout mon « nuage personnel », précédemment sur un partage NFS. Néanmoins, si le client ownCloud standard convient lorsqu’il est disponible, il ne l’est pas toujours. En particulier :

  • Je transporte avec moi sur clef USB un bureau Linux léger basé sur TinyCore Linux, et pour lequel ce client n’existe pas.
  • Je possède aussi un vieil ordinateur portable qui doit se contenter d’un système d’exploitation obsolète à cause d’un composant vidéo bogué, qu’aucun système plus récent ne supporte (bien que cette même référence de composant graphique sur un autre ordinateur portable soit parfaitement supportée…).

Pour de telles situations, j’ai essayé d’utiliser DavFS, qui s’est avéré bien trop lent ; cela reste toutefois un bon second choix. Puis j’ai essayé le programme Java WebDAV-Sync, mais bien que celui-ci ait correctement effectué l’import initial, on ne peut pas dire que la synchronisation ait vraiment fonctionné : l’ensemble des données était à nouveau intégralement téléchargé à chaque nouvelle tentative de synchronisation !

Donc j’ai créé mon propre outil de synchronisation, dont les seules dépendances sont curl et bash, et optionnellement ssh. Ces dépendances sont disponibles partout, même sur Windows et quelques systèmes embarqués ;-)

This article is also available in English.

Lire la suite...

dimanche 2 août 2015

Lightweight file synchronization for ownCloud and WebDAV

I recently began using ownCloud for file synchronization. All in all, although there are some minor hindrances, the experience is really satisfying. So much so, that I moved all my “personal cloud” data to ownCloud, from the previous NFS share. However, although the regular ownCloud client is just fine where available, it is not available everywhere. In particular:

  • I carry around on a USB stick a lightweight Linux desktop based on TinyCore Linux, for which the client is not available.
  • I also have an old laptop that is stuck with an obsolete operating system because the video chipset is buggy, and no newer OS will support it (even though the “same” chipset reference in another laptop works just fine…).

For these situations, I tried using DavFS, but this solution was much too slow; it is a great fall-back, though. Next I tried the Java program WebDAV-Sync, but although the initial download went fine, sync did not work all that well: the whole share was fully downloaded again each time!

So I created my own synchronization tool, the only dependencies of which are curl and bash, and optionally ssh. These dependencies are available everywhere, including Windows and some embedded systems ;-)

Cet article a été traduit en français.

Lire la suite...

mercredi 1 juillet 2015

Aujourd'hui est un jour spécial

Jul  1 01:59:59 myserver kernel: [100093.877018] Clock: inserting leap second 23:59:60 UTC

dimanche 7 juin 2015

Both virtual and real users in the same domain with Exim and Courier

My personal server only served a few real users to this day, which means that each of us had an account on the server, that owned files and could run commands, schedule tasks, and so on.

I just extended my hosting perimeter, but I only allow email usage for my new guests so far. With this in mind, I did not want to create new Linux accounts, which would have needlessly weakened my server by exposing it to attacks towards these new accounts. Thus I created my first virtual users, for electronic mail.

I found several configuration examples on the Internet, but those mostly addressed situations where all users were virtual, often in several domains, or where a given domain was targeted at real users while others domains were targeted at virtual users. My wish was rather to allow new, virtual, users into my existing domains, the users of which were so far of the real kind only. Still, by taking from all those readings, it was not that hard to get there.

Cet article existe aussi en français.

Lire la suite...

samedi 6 juin 2015

Utilisateurs virtuels et réels dans le même domaine avec Exim et Courier

Mon serveur familial ne servait jusqu’à présent que des utilisateurs réels, c’est à dire que chacun y avait un compte, propriétaire de fichiers et autorisé à exécuter des commandes, planifier des tâches, etc.

Je viens d’étendre le cercle des utilisateurs sur mon serveur, pour la messagerie uniquement pour l’instant. Dans ce contexte, je ne voulais pas créer des comptes Linux, ce qui aurait augmenté la surface d’attaque du serveur sans nécessité. J’ai donc introduit des utilisateurs virtuels pour la messagerie.

Les exemples que j’ai trouvés sur Internet visaient principalement à gérer de multiples domaines virtuels, avec exclusivement des utilisateurs virtuels, ou bien à gérer un domaine avec des utilisateurs réels et des domaines avec des utilisateurs virtuels. Mon souhait était plutôt d’ajouter des utilisateurs virtuels aux domaines que je gère déjà et qui contennaient déjà des utilisateurs réels. En m’inspirant de ce que j’ai lu, ça n’a pas été très compliqué.

This article has been translated to English.

Lire la suite...

dimanche 3 mai 2015

Nginx and php-fpm with Debian Jessie

With the new Debian Jessie, I found that my PHP pages would all be displayed as blank pages, even though all regular HTML pages would display correctly.

This comes from the fact that the SCRIPT_FILENAME parameter has been removed from the /etc/nginx/fastcgi_params file. A new file, named /etc/nginx/fastcgi.conf, does reintroduce this parameter, but with the official value “$document_root$fastcgi_script_name”, instead of the former value “$request_filename”.

I really do not understand why the new value is the official one upstream, since it does not play well with aliases. So, first, I referenced fastcgi.conf instead of fastcgi_params, since the former seems to be the preferred file now ; and second, I changed my Nginx configuration to define SCRIPT_FILENAME this way:

fastcgi_param SCRIPT_FILENAME $request_filename;

lundi 6 avril 2015

File synchronization with ownCloud using Nginx on Debian

ownCloud is great! I chose it with the aim of sharing contacts and calendars with my server more reliably, and it is working perfectly.

After having used ownCloud for some time, I got interested in its file synchronization feature. Unfortunately, even though I heeded all the advice given in the documentation, I could not get any file bigger than 1MB to synchronize. Since I had no real use for this feature (I use NFS and SSHFS), I just moved on… until today.

Cet article existe aussi en français.

Lire la suite...

Synchronisation de fichiers par ownCloud avec Nginx sur Debian

ownCloud est super ! Je l’ai choisi pour fiabiliser la gestion des contacts et des calendriers sur mon serveur, et ça fonctionne parfaitement.

Après avoir utilisé ownCloud un moment, je me suis intéressé à sa fonctionnalité de partage de fichiers. Cependant, bien que j’aie suivi toutes les recommandations de la documentation, il restait impossible de synchroniser des fichiers de taille supérieure à 1 Mo. N’ayant pas vraiment l’utilité de cette fonctionnalité (j’utilise NFS et SSHFS), j’ai simplement laissé tomber… jusqu’à aujourd’hui.

This article has been translated to English.

Lire la suite...

- page 1 de 5