Category Archives: Linux

Stuff about the superior OS

Duplicate bind mounts with chroots on systemd

When setting up jails, I commonly end up with structures like this in my /etc/fstab: /dev /jail/test/dev auto bind 0 0 /dev/pts /jail/test/dev/pts auto bind 0 0 /dev/shm /jail/test/dev/shm auto bind 0 0 /proc /jail/test/proc auto bind 0 0 /sys /jail/test/sys auto bind 0 0 /dev /jail/test2/dev auto bind 0 0 /dev/pts /jail/test2/dev/pts auto bind […]

W: [pulseaudio] authkey.c: Failed to open cookie file ‘/home/user/.config/pulse/cookie’: No such file or directory

W: [pulseaudio] authkey.c: Failed to open cookie file ‘/home/user/.config/pulse/cookie’: No such file or directory W: [pulseaudio] authkey.c: Failed to load authorization key ‘/home/user/.config/pulse/cookie’: No such file or directory I had this problem on an embedded box, with no X11, or even a screen. Turns out that at least some versions of Debian have an issue […]

My tweaks to Kali Linux (note to self)

Here are some of the things I did to make Kali Linux 2016.1 suit my taste, mostly intended as a note to myself, but posted here in case it helps anyone else. General checklist Install aptitude and update everything Add settings icon to left panel Enable mouse tap to click in “Settings => Mouse & […]

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 […]