Convert HTTP response body to status code with HAproxy

[update 2025.10.29] abstract, minor clarification edits. TL;DR Program HAproxy with LUA to extract information from backends and set response headers/status codes. I'm using HAproxy to load-balance HTTP between two backend nodes. HAproxy is pretty smart about doing this, backing off failing backend nodes, retrying failed requests on healthy backend nodes etc. Recently I got a … Continue reading Convert HTTP response body to status code with HAproxy

Ubuntu 20.04 not resolving local network hostnames

An Ubuntu 20.04 laptop installation started not being able to resolve the names of hosts in the same local network. Although the host names were registered with the router, the laptop wouldn't be able to resolve those host names. Surprisingly, neither netbios resolution worked (although nbtscan would find those hosts). The solution is to bypass … Continue reading Ubuntu 20.04 not resolving local network hostnames

Ubuntu 20.04 getting wrong IP address

Yesterday (early August 2021) my Ubuntu 20.04 installation started configuring all network interfaces (wifi, ethernet) with IPv4 addresses from the wrong network segment block, namely 192.168.0.x. IPv6 still worked fine. I didn't figure out whether that's due to a change in the router or the OS (I suspect the router, because the situation improved when … Continue reading Ubuntu 20.04 getting wrong IP address