Using TCP-LP with pycurl in Python

Intro TCP-LP (low priority) is a TCP congestion control algorithm that is meant to be used by TCP connections that don’t want to compete with other connections for bandwidth. Its goal is to use the idle bandwidth for file transfers. The details of TCP-LP are here. With Linux’ plugable congestion control algorithms, it is possible …

Continue reading ‘Using TCP-LP with pycurl in Python’ »

Multiple relay configuration based on sender address with sendmail

One of the needs that came up was to be able to use separate relay configurations based on the sender email address, using sendmail. The problem is that sendmail is missing support for most parts of that sentence. At the end the solution involved a combination of sendmail, smarttable, procmail and msmtp The idea is …

Continue reading ‘Multiple relay configuration based on sender address with sendmail’ »

OpenVPN and remote-cert-tls server

This required a bit of digging into OpenVPN’s and OpenSSL’s code to figure out. The problem This error: Thu Sep 11 00:12:05 2014 Validating certificate key usage Thu Sep 11 00:12:05 2014 ++ Certificate has key usage  00f8, expects 00a0 Thu Sep 11 00:12:05 2014 ++ Certificate has key usage  00f8, expects 0088 The condition …

Continue reading ‘OpenVPN and remote-cert-tls server’ »

Linux, multicast, bridging and IPv6 troubles (i.e. why my IPv6 connectivity goes missing)

For a long time now I had a very annoying problem with IPv6 under Linux. My setup is as follows: Linux box <-> Switch <-> Router The Linux box uses a bridge interface (br0) and usually only has one physical interface attached to it (eth0). That’s a very convenient setup. The problem is that after …

Continue reading ‘Linux, multicast, bridging and IPv6 troubles (i.e. why my IPv6 connectivity goes missing)’ »

Installing package build dependencies from a .dsc file (Debian)

There are cases where one needs to install build-dependencies of a .dsc file in Debian. Apparently this is not as trivial as: The easiest way I’ve found so far is to use mk-build-deps (from the devscripts package): This godly script: Creates a psudo package that depends on the build-depends of the .dsc file Does a …

Continue reading ‘Installing package build dependencies from a .dsc file (Debian)’ »

Raspberry Pi under QEMU

What: Run raspberry pi system under QEMU Why: I wanted to have builder environment for Raspberry PI. Emulating it it much faster that running something on it Disclaimer: I am not a qemu/raspberry-pi expert – Some things may be wrong here Introduction Running qemu-arm is slightly different than running qemu for x86. There is no …

Continue reading ‘Raspberry Pi under QEMU’ »

IPsec, Racoon, setkey, Linux, Mikrotik, tunnel, transport and everything

It took me more than 6 months in order to sort all issues, so here are the experiences. Most of the trouble was because I didn’t knew or I didn’t had things clear in my mind. I wanted to have IPsec communication between a bunch of servers and a home network. I believe that this …

Continue reading ‘IPsec, Racoon, setkey, Linux, Mikrotik, tunnel, transport and everything’ »

rsync as root with rrsync and sudo

Here’s how to rsync something to a remote host as root without allowing root logins and with directory restriction. I did that because I wanted to sync /srv across servers. In general it will use rsync over ssh, sudo, rrsync and a remote non-root user. I assume that rsync will run from srv1 to srv2. …

Continue reading ‘rsync as root with rrsync and sudo’ »

Linux Containers: Easy LXC

Linux containers (a.k.a. LXC) rock. It’s the ultimate way of having multiple Linux boxes with minimal requirements. Here’s how I do it under Debian (and the script I’m using): Requirements This guide is for Debian  testing as of 25 March 2012. However it should work for other cases as well. The procedure creates a minimal …

Continue reading ‘Linux Containers: Easy LXC’ »