Tuesday, January 7, 2020

autossh and port forwarding (a cheap and easy VPN alternative, macOS to Linux)

I have a simple unsecured web service running on my home network, that I need to access from the office. Before, I was using Viscosity to connect to an OpenVPN instance running on a DD-WRT router at tome. But I also connect to home using the official OpenVPN client for iOS, which started complaining - and eventually stopped working - due to weak encryption in my 2011-era 2.4 install. I did a wholesale upgrade (new DD-WRT install, new keys, etc), and broke the VPN tunnel. Of course. I’m trying to figure out where it’s failing, and will likely eventually return to OpenVPN, but in the interim, I dusted off my SSH knowledge and redirected local ports on my macOS box to servers on my home network.


First, I setup a private/public keypair and created an entry for my home network using a Dynamic DNS address I have setup (all addresses have been changed to protect the idiotic):

$ cat .ssh/config 
Host home
Hostname myplace.adynamicdnsprovider.com
User root

IdentityFile ~/.ssh/homerouter.rsa

Forward local ports

Next, I forwarded local port 8087 to port 80 on one of my internal boxes, and local port 15900 to port 5900 (VNC) on another:

ssh  -L 8087: -L 15900: home

Voila, now I can browse to and access the home server, and pull up the desktop using /System/Library/CoreServices/Applications/Screen Sharing.app on the Mac:


Next step was to automate keeping the tunnel open. I use brew to manage “Unix-style” packages on macOS - highly recommended.

$ brew install autossh

$ cat StartSSHTunnel.command 
#!/usr/bin/env bash
autossh -M 0 -N -f -q -L -L 8087: -L 15900: \
 -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no \
 -o BatchMode=yes home 

And that’s it! It’s not quite as elegant or seamless as having a properly functioning VPN, but I got it up and running in about 5 minutes, vs. banging my head against the wall trying to troubleshoot why Viscosity can’t seem to connect to the router.

Wednesday, January 1, 2020

Streaming from the HDHomeRun Prime

In lieu of huge, clunky, rented cable boxes, I have a Silicon Dust HDHomeRun Prime device hooked up with a cable card, and it exports unprotected basic cable streams to my LAN. (I don’t watch much TV, get no OTA reception, but our HOA includes a few channels “for free,” so why not. Football.) The streams are 1080 and fairly large, and WiFi in my condo sucks (lots of competing signals).

So Ethernet and a beefy-enough client device (i.e., not my circa-2012 Panasonic Bluray player, BTDT) is required to really watch the streams.

The HDHR Prime exports streams via UPnP, but client support is ... Spotty. I really want to watch it using the Apple TV 4 I got for Xmas this year, but so far, no joy. Here’s what I’ve tried so far.

iPhone X

Works perfectly under VLC. Just opened up the app, tapped the cone in the upper left corner of the screen, then Local Network, and it appears under Universal Plug'n'Play (UPnP). Streams the video perfectly, albeit limited by the WiFi connection:

So far so good.

PlayStation 4

Plex doesn’t see the HDHR Prime, but it’s visible in the Media Player app, which sees the Favorites and Channels folders and plays the streams perfectly.

Apple TV 4

This one’s frustrating. Plex doesn’t see it at all. VLC doesn’t see it at all, which I just don’t grok. 
PlayerXtreme sees the HDHR Prime under Network, sees the Channels and Favorites folders, sees the individual items in those folders, but the icon is a white page with a question mark, and the channels can't be played:

I haven’t found any solution that will let me watch the HDHR Prime streams on the Apple TV 4 yet, which is disappointing.

Roku Express

Just to round this out; Plex (again) doesn’t see it at all. Roku Media Player does (sees it under Video as a Media Server), and plays the channels, but playback breaks down into blocky pixel hell constantly due to WiFi connection limitations. 

I wish this stuff was easier to troubleshoot. My kingdom for debug logs!

Update (January 5, 2020)

Silicon Dust support pointed me towards two apps known to work:
But, weirdly frustratingly, now VLC on the Apple TV sees the HDHomeRun Prime, along with everything else on the network. (No idea what caused the delay in discovering the services.)

Thursday, December 19, 2019


Well, my ArkaHosting VPS instance finally actually went offline (expected). I have all the data online at home, but need a publicly accessible version for beta testing (don’t want to open that network to the world).

Where to move to?

Google seems to be indecisive (and has a history of growing board with offerings and dropping them, chronicled at Killed by Google and elsewhere). Azure is Microsoft, and while this might be the new and improved Microsoft, I tend not to trust them. (Can’t imagine why.) There’s AWS, but, that’s, you know, Amazon (as also seen in Unfulfilled). (Still on my personal boycott after they - for the umpteenth time - flaked on “guaranteed same day delivery” for stuff I really needed to tend to my dying dog.)

Seeing what’s out there. For context, I was paying the (evidentially unsustainable) amount of $36.50/year, including a $1.50 upcharge for a 1 Gb/s link upgrade from the standard 100 Mb/s connection, for a “6GB VPS” with the following specs:

  • 4 CPU Cores
  • 6GB DDR3 RAM
  • 80GB SSD Storage
  • 5TB Monthly Transfer
  • 1 x IPv4 Address
  • OpenVZ/SolusVM Panel

I was using about 45GB of storage for the massive database supporting my tentatives ruling collection, and the speed was “good enough.” I used barely any bandwidth.

What else is out there, that’s comparable?

AWS LightSail

An instance with 4GB RAM, 2 cores, 80GB SSD, and 4TB transfer is $20/month, $240/year (6.5x more expensive). I could go with a lower end server, and buy bulk storage ($.10/GB per month; 64GB is $6.40). A managed database sized large enough to hold the current tentatives dataset is $30 for a standard plan, $60 for a high availability plan, per month (2GB RAM, 1 core, 80GB SSD, 100GB transfer, data encrypted).


West US region, Linux, CentOS, Basic tier, A3 instance (4 cores, 7 GB RAM, 120 GB storage), $0.188/hr, or, $137.29/month.

There’s RackSpace, but you have to request a free quote. Nope. Put the pricing information front and center or I’m not wasting my time.

Google Compute, on a 1 year committment, $0.019915/vCPU hour, $0.002669/GB hour (RAM), so, a 4 core, 6GB Compute instance, ~$59 for the CPU, $8.51 for the RAM, ~$67.50. $32.64/month for 80GB of storage. 5TB of network egress, at $0.11/GB, would be almost $600. Using the calculator, 730 hours/month for a regular class VM (n1-standard-1, with 1x375GB SSD), one year commitment, $49.11/month (that’s for 1 vCPU, 3.75 GB RAM).

What about these non-top-tier players ...?

Evolution Host

€40 (currently $44.49)/month gets you 4x 4GHz+ CPU cores, 4GB DDR4 RAM, 80GB SSD, 1Gb/s connection, 60TB monthly transfer, and hosting in Europe or the US (Dallas, Portland, Virginia). Not awful, but more than LightSail.


The L-NVMe-VPS option is $12.99/month, for 4 CPU cores, 6GB RAM, 80GB NVMe storage, 5TB bandwidth, and one IPv4 address. Storage VPS options “coming soon.” They’ve apparently been around for almost 5 years. This one could be a contender. $156/year. Still more than 4x the cost of the cheap VPS I was using, but, c’est la vie.


$16/month for 4 virtual cores, 6GB RAM, 1.5 TB bandwidth, 90GB SSD storage, 1 Gb/s connection, 1 IP address, locations in London and Amsterdam. Close, but not super-competitive, especially without domestic colo presence.


Enterprise: 60GB storage, 2GB RAM, 2TB bandwidth, $8/month.
Corporate: 80GB storage, 4GB RAM, 3TB bandwidth, $12/month.

The software offerings are ancient, though; CentOS 6 (released almost 9 years ago, and end of life hits later this year); Ubuntu 16.04 (4 years old)...

Sunday, December 8, 2019


Sigh. Just saw this email, after seeing an article on Slashdot. I have a VPS instance with ArkaHosting. Fortunately, the (massive) database is a slave copy of a MariaDB instance I host on my redundant NAS at home, but still...

From: ArkaHosting <support@arkahosting.com>
Date: December 6, 2019 at 16:18:33 PST
Subject: To Our Customers - Important Information

Dear Customer,
Over the past few months we have been met with many challenges within the hosting business. Some that have not been overcome.
As result of this we will be closing our doors.  We will be shutting down this Monday 12/9/2019.  We are taking this time to let our customers know so that they may backup and retrieve all of their data before then.
We deeply apologize for this inconvenience.
Thank You.
ArkaHosting Staff
support@arkahosting.com - Available 24x7 For You!
visit our website log in to your account get support
Copyright © ArkaHosting, All rights reserved.

Wednesday, November 27, 2019

No more Sense-Ation repair program

Well, that’s pretty F’d up: One of the things I really liked about the Sense-Ation harnesses (been using them since 2009) was their repair program. Mail them a harness with one or two bad straps (frayed, chewed, whatever), for $5/strap they’d repair it and return it to you. Despite the repair form still being up on their website, they’ve apparently stopped this service, with no notice (and they have my contact info; I’ve bought several harnesses from them directly). Lame.

Tuesday, November 26, 2019

Chewy.com multiple autoshipments

For my two pups, Chewy.com has been a godsend. I have their food on autoship for a slight discount but also to not have to worry about it. (I’m saturated.) But I couldn’t figure out how to have different schedules for the different dogs ... (Astrid gets about 2 scoops of Purina Pro Plan Bright Mind 7+, daily, while Brian is currently on Eukanuba Large Breed Puppy and transitioning to Royal Canin Labrador Puppy, and the amounts vary as he gets older and larger.)

It’s counter-intuitive. To my mind you should be able to click “Add to Autoship” and then, under Manage Autoship, move products to different auto shipment entries with different schedules. The fact that the one autoshipment I had setup was identified as “Autoship #1” suggested it was possible, but the way to do it was non-obvious:

  • Instead of clicking “Add to Autoship,” click “Add to Cart
  • On the next screen, click “Proceed to Checkout
  • On the “One-Step Checkout” screen, on the left side, there’s a section to “Start Autoship...” Click the radio button for “Yes, make my life easy” and setup the frequency. When you place the order, a new autoship will be setup, and can be independently edited:

Tuesday, November 12, 2019

Converging Shipments: A Headphone Synergy

A few days ago a massdrop special, offering the Sennheiser HD58X Jubilee headphones, caught my attention at a price I couldn’t pass up ($135, less the $20 for being a new drop member). I’ve been listening to Bose QC25s at the office and QC35 IIs at home, but they just lacked a certain je ne sais quoi. (In particular: Bass. Bury a Friend just gets murdered on them.) Meanwhile, I still haven’t listened to Fear Inoculum, as I haven’t found the right time to sit down with it, without distraction. (I named my first Labrador Maynard, y’all...) Finally, cleaning house, I found (again) my old iPod mini first generation, and toyed with the idea (again) of modernizing it. It still works, but the battery is pretty weak, and the MicroDrive is a moving part that will fail sooner or later. So I ordered:

  • A high capacity replacement battery (750mAh EC003, 3.7 VDC, 2.77 Wh) ($17 when I ordered it, free shipping) (no reviews; wish me luck) (I would have gone with the relative known quantity of the iFixit.com battery, but they’re out of stock)
  • SanDisk Ultra 16GB Compact Flash card (SDCFHS-016G-A46) ($21) (better bang for the buck might have been a 32GB card, which are around $1/GB, but larger cards use more power and I kinda wanted to - maybe irrationally - keep this on the cheap side; it’s still going to have 4x the capacity it did when new)
  • Some spudger tools ($7), which haven’t shipped yet and which I’m not sure are strictly necessary, given everything else I have in my toolbox.
The battery was supposed to arrive yesterday but the office was closed, so it showed up today. The CompactFlash card was always supposed to arrive today, and hopefully it will. The headphones were supposed to arrive tomorrow, but the most recent tracking information now shows them out for delivery and expected delivery today. And the old friend I was supposed to have dinner with tonight had to kick it back at least a week while he deals with employee issues.

Tonight may finally be the night I sit down and properly listen to the first TOOL album in ~13 years...