Using WireGuard with OSPF and Bird

I’ve long used OpenVPN’s PtP tunnels to set up star-style network topologies across the WAN, with dynamic routing set up using OSPF/Quagga.

WireGuard is new, allows simpler configuration, and is measurably faster than OpenVPN, so naturally I wanted to switch to it.

However, WireGuard seems to be aimed at smaller, simpler use cases, with its AllowedIPs configuration option being used to set up both static routes, as well as a form of allowlist regarding what traffic is allowed to flow through the tunnel. With this, I would have needed to hard code all subnets across the network in each end’s AllowedIPs, which would have prevented taking advantage of routing protocols to dynamically set up routes.

[Read More]

Live increasing a KVM VM’s root partition

My mailserver’s root partition has gotten really full lately, and I didn’t want to incur downtime by taking it down to enlarge offline:

root@mail:~# df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/vda2      ext4       19G   17G  1.2G  94% /

I run my VMs on KVM and I use an LVM LV for each VM, and according to a SO post, it is possible to increase the size partitions within a VM online, so let’s go for it:

[Read More]

Phanteks p400s Custom Liquid Cooling Loop

I’ve been building computers/servers for roughly 11 years now–first build in 2006 was an Athlon 64 3800+ with a Geforce 6600–and I’ve always only cared about the components themselves, less so what the case or innards look like.

I hit a sort of “midlife crisis” where I wanted to make my home box look really cool. At the time it had 6 hard drives–two mdadm raid1 arrays + 2 SSDs carved using LVM–and I wanted to upgrade to a case with a window, as I was using a windowless Nanoxia Deep Silence 4. The DS4 is a great case but it’s not meant for flashyness. When I built it I hadn’t cared about cable management so it was a mess on the inside.

[Read More]

Fixing Bluetooth audio in Ubuntu Xenial

I have a Sony bluetooth speaker I usually use with iPhone and Macbooks. I’ve wanted to use it with my Ubuntu Xenial (4.4.0-93-generic) desktop for a long time but never got around to getting a bluetooth dongle or an RCA cable.

Today I went to Fry’s to get some cables for another project and finally decided to grab a USB Bluetooth dongle. I picked up a Sabrent BT-UB40 as it claims to have Linux support.

[Read More]

Win7 KVM VGA Passthrough (gtx 750)

I have a Win7 qemu VM passed a gtx 750 and a keyboard+mouse, and the following is a rough guide, inspired from other similar guides which didn’t quite work for me or weren’t informative enough.

Background:

I’m running 64bit Debian Jessie with Qemu/kvm from stock apt. I’m not using libvirt for, as the older version in Debian’s apt does not support -cpu kvm=off among other things. This is a file server/VM host that I choose to use headless, and now it also functions as a very capable gaming rig thanks to virtualization.

[Read More]

Moving from Android to iPhone/iOS

My last iPhone was in 2009, and I switched after around a year when I got sick of AT@T, which used to be the sole carrier for iPhones. Since then I used and loved the Motorola Droid and its Motorola successors. Yesterday, I took the plunge and got an iPhone 5S. Despite the iPhone 6 coming out next month, the feeling of nostalgia was too overbearing to make me want to wait.

[Read More]

Deleting SVN Revisions

Say you have a large SVN repo with 617 commits. You want to physically delete the last 6 so you’re back to r611. You do not want the data contained in these revisions to exist so svn revert is not appropriate.

The most elegant way of killing off r612-r617 is to make a SVN dump up until revision r611 and then restore from it.

Dump the server-side SVN folder and then move it aside:

[Read More]

desktop notifications for irssi nick highlights

I am a long term user of screen+irssi, a quite common way of using IRC for unix-inclined people neckbeards. One problem with this approach is that you will not be notified of events such as nick highlighting and PMs outside of your terminal window.

A quick hack is to use the fnotify irssi script to write highlights to a text file, and then a quick shell one liner to continually read events (lines) from this file and alert you via the gui. This post assumes basic knowledge of irssi, which I’m not going to cover here.

[Read More]

Realtime stats of dd

There are at least two ways of getting the progress of the dd command. One is sending the dd command the -USR1 kill signal, which will cause it to print out its current progress to stderr:

kill -USR1 `pidof dd`

The other way is to examine the fdinfo file (either 0 or 1) for the dd process under /proc to see how much data has currently been copied. This is more efficient and way faster than sending dd a signal as it’s pulling directly from /proc and instead of waiting for dd to catch the signal.

[Read More]

Drastically increase mkfs.ext4 speed

Every now and then, you might want to create an ext4 filesystem on a block device spanning several terabytes, and this is almost always a really long process, taking up to several hours or even days.

There is a little known trick that can significantly reduce the amount of time needed to create ext4 filesystems:

mkfs.ext4 -E lazy_itable_init=1

The lazy_itable_init flag is default on newer versions of e2fsprogs, and the above snippet works on systems as old as Centos5.

[Read More]