Category Archives: Linux

Stuff about the superior OS

SPF exists for a reason, and postfix makes it ridiculously easy

In the bronze age, messages came in, signed bob@lamuella.com, and you’d simply have to assume they were from the Almighty Bob. Today, email is still technically in the iron age, but at least we have SPF. In a nutshell, when lamuella.com enables SPF for their domain, they can be sure that other people, which mail […]

Squid Compile with SSL support under Debian Jessie

Here’s how: apt-get update # install required dev packages apt-get install -y openssl devscripts build-essential libssl-dev # install debian squid3 source code apt-get source -y squid3 # install all required dependeny packages apt-get build-dep -y squid3 # reconfigure cd squid3-3.4.8/ vi debian/rules root@jessie:~/squid3-3.4.8# diff /tmp/rules debian/rules 46c46,48 < –with-default-user=proxy — > –with-default-user=proxy \ > –enable-ssl […]

Relay UDP broadcasts between subnets in pfSense

I recently had a need to do this at work, and was told by various forum posts and ##pfsense on freenode that it wasn’t a good idea and wasn’t possible. Well, we needed it anyway, so time to do some hacking πŸ˜€ Here’s the script I came up with. It employs tcpdump and tcpreplay to […]

Mounting and using KVM raw image files on the host system

Boldly stolen from David Champion at the University of Chicago, and archived for personal reference. All credits to that page. kpartx will scan a block device β€” e.g., your /dev/loop0 β€” and create device-mapped specials under /dev/mapper for the partitions. Then you can address individual partitions. (N.B.: When done, before you can losetup -d the […]

Tool tip: “vbetool” runs real-mode video BIOS code to alter hardware state

This is so damn useful to turn on and off remote displays through SSH, for wall-mounted information screens and similar. Available in your friendly neighbourhood Linux distribution. VBETOOL(1) User Commands VBETOOL(1) NAME vbetool – run real-mode video BIOS code to alter hardware state SYNOPSIS vbetool [[vbestate save|restore]|[vbemode set|get]|[vgamode]|[dpms on|off|standby|suspend|reduced]|[post [romfile]]|[vgastate on|off]|[vbefp pan‐ elid|panelsize|getbrightness|setbrightness|invert]] DESCRIPTION vbetool […]

Solution: Using ProxyPass from http to https in apache2 causes AH02032 SNI error

I got this error message on the internal.server.host when forwarding an URL from an extrernal HTTP server to an internal HTTPS server: AH02032: Hostname internal.server.host provided via SNI and hostname external.server.host provided via HTTP are different The problem turned out to be that the internal server was trusting the external one’s X-Forwarded- headers, a feature […]