September 11, 2020

Using OneDrive on Mac or Linux for Backups

Recently I discovered that I have access to Office 365 through my university. I am not interested in Office 365 at all, but my subscription includes 5 Terra (yes!) Bytes of OneDrive storage. This has aroused my full interest. But: the official OneDrive client is not really what I want, because I don’t want to synchronize stuff from a folder on my hard drive with OneDrive. I would like to “mount” OneDrive and use a tool, preferably BorgBackup or something similar, to transfer encrypted snapshots to OneDrive. Read more

May 22, 2020

xtables-addons: How to fix 'Can't open DBIP database' Error

When you are using the 3.8-* version of xtables-addons to harden your server with a geofense, chances are super high that things don’t work anymore… The latest problem occurs after you have downloaded the geo-ip-tables from Maxmind and try to convert the tables for the geofense with xt_geoip_build. You get this error: Can't open DBIP database. The simple reason for this is that the developers of xtables-addons decided to get rid of Maxmind (maybe because they did that thing with the user accounts a couple of months ago? Read more

May 15, 2020

MSMTP: Sending Mail With a Linux Server

If you are running a Linux server, you probably want to enable that thing to send emails to you. This is useful, for instance, to tell you that someone got blocked by fail2ban. In earlier years, SSMTP has been a good candidate to achieve this kind of thing. Today, Debian, Raspbian, and probably Ubuntu server OSes have no packet for SSMTP anymore. However, you can use MSMTP to achieve the same thing. Read more

January 2, 2020

xt_geoip_dl vs. Maxmind Accounts

Since some time I use a geofence on my servers to ban all incoming requests that do not originate from DE. The company (Maxmind) that distributes up to date mappings from IP ranges to country codes (“geoip tables”) recently changed how they distribute these files. Now, you must have an account and license key to download the geoip tables. Note: everything is still free! The need for login credentials breaks the update mechanism for geoip tables which typically uses xt_geoip_dl. Read more

June 18, 2019

Extract Attachments From Email (mbox) using Python

Some days ago I had the idea to dig around in my mailbox and see what people have sent me over the years. As I was especially interested in the attachments (pictures) I googled a bit and found out you can quickly extract stuff from a mbox (used by a Dovecot SMTP server). Here’s what I cobbled together. #!/usr/bin/python import mailbox import dateutil.parser from datetime import datetime mbox = mailbox.mbox('/home/USER/mail/MAILBOX') def extractattachements(message): if message. Read more

June 11, 2019

A Song of Praise on Manjaro Linux (Gnome Edition)

As I am a friend of free and open source software I actually would love to use a Linux-based OS on my Laptop(s). However, after countless tries I must say that I am not a big friend of Linux on a notebook. I often found the system to be a bit fragile, things that “just work” on other OSes (like a Bluetooth keyboard, tethering or an external screen) can be a fight, if you have a bit of special hardware it can take ages to set it up, power management sometimes does not work properly (so your Laptop gets super hot while the battery is drained in no time)… At least, this is what I have experienced in the last years with Ubuntu or Ubuntu-based distributions running on my old MacBook Air from 2011. Read more

May 23, 2019

Deploying a Website with goHugo.io and Gitlab CI/CD

When I need to build a website, I typically use Hugo to generate the .html from .md. However, one thing is a bit inconvenient: deployment. If not done right, you have to do that manually (edit -> hugo -> rsync). Alternatively, and much better, you can use the Hugo-Gitlab|Hub-Netlify-toolchain I described earlier. These day, I needed a website for a new research project of mine and didn’t want to ship the site with Netlify. Read more

March 26, 2019

Playing with WireGuard VPN

Since a couple of years I use OpenVPN to access my home network from remote and also to protect my traffic when I am traveling and have to use WiFi networks I do not completely trust. Unfortunately, the iOS VPN client does not work for me anymore so I needed an alternative. My Fritz Box (German home WiFi router brand) actually supports an IPSec VPN. However, iOS’s VPN client is horrible. Read more

March 16, 2019

xtables-addons-common on Ubuntu 18.04

Last year in June I set up geofence on my home server to ban all access not coming from DE. In January I noticed that things did not work anymore. A bit of research revealed, that the company that provides the needed GeoIP tables decided to stop shipping them in format A and only offered the tables in format B. So neither the script that downloads the tables (xt_geoip_dl) nor the script that converts the tables (xt_geoip_build) into the binary format that xt_geoip can digest to block connections attempts worked anymore. Read more

March 4, 2019

Block Ads and Trackers with Pihole in a Docker Container

Recently I stumbled upon Pihole, which is a tool that blocks advertisements and web trackers. The nifty idea of Pihole is that it is no web proxy as Privoxy but it acts as a DNS server in your network. So, after installing Pihole, you setup your devices in a way that they use Pihole as a DNS server. Then, the device’s DNS requests for “good” domains are answered and DNS requests for known, blacklisted ad/tracker domains are not answered (= blocked). Read more

© ho1ger 2015 - 2021