Using Nginx Stream Directive to Host SSH and Multiple HTTPS Servers On the Same Port

The Problem

If you’ve ever tinkered with self-hosting web projects and services, you’re probably already familiar with one of the major webservers like Apache or nginx. You’ve likely also hosted other non-HTTPS services such as SSH, for headless access to a Linux machine or, as I like to do, tunneling your browser traffic through a home Linux server via a SOCKS proxy. This is especially useful when traveling and using open or un-secured WiFi networks, such as at hotels or coffee shops, to prevent your connection from being monitored surreptitiously. Generally, tunneling like that works well and you can run your HTTPS traffic on the standard port 443, and SSH on 22 (or better yet some high-numbered non-standard port). However, you may occasionally run into a situation where outbound ports on that network are blocked, making it difficult or impossible to reach your SSH server. Generally, ports like 80 and 443 are open for outbound traffic to avoid breaking normal HTTP/HTTPS browsing, and we can utilize this fact to get around the blocked port problem.

Read more

Share Comments

Using Esp8266 As An IoT Endpoint With Encrypted MQTT Transport

Using ESP8266 as an IoT Endpoint with Encrypted MQTT Transport

A while back, I purchased a few SparkFun Thing Dev boards (featuring the venerable ESP8266 WiFi chipset) and SparkFun Beefcake Relays with a plan to use them in a cloud-free IoT setup. After some investigation, I settled on using the MQTT protocol as a lightweight way to send and receive messages between my Linux server and any number of IoT endpoints throughout my house.

Read more

Share Comments

Raspberry Pi Zero W Simultaneous AP and Managed Mode Wifi

Enabling Simultaneous AP and Managed Mode WiFi on Raspberry Pi Zero W (Raspbian Stretch)

I recently purchased a pair of Raspberry Pi Zero W boards, and plan to use them for some home automation / IoT-type work. One of my requirements is that the WiFi on this board be able to run as both a “managed” device (also known as “client” mode) and as an access point, preferrably at the same time. After looking around a bit online, I found several people who claimed to have gotten this working, as well as posts saying it should work, based on the chipset. Despite my best efforts, I was unable to get any of those tutorials to work reliably on their own. By combining some information garnered from each one, along with some trial and error, I was finally able to get AP/Manged mode working, as described below.

Read more

Share Comments

Hello

What’s with TheWalrus?

This one’s easy. I was looking for interesting words that end with ‘us’ that could be purchased as cheap domain names. I picked up a few and so far have only maintained TheWalrus and TheCactus. I have no personal attachment to either one yet, but I’m sure I can retroactively drum something up if I can dedicate some time to this blog.

What’s with this blog?

Ever since – ohh… – high school, I’ve been meaning to keep an online journal of sorts, before the word ‘Blog’ was a thing. I’ve made several attempts at doing it, but I’ve always wanted to either hand-code, self-host, or otherwise have total control of the whole thing. I have a tendency to start things, work on them until they’re “good enough,” and then never really finish them up. Naturally, this has led to a lot of half-hearted starts at creating my own website which inevitably fall to the wayside once work, family, and real life take center stage. Finally, I gave in and decided to use Hugo and GitHub Pages. I’m hoping that getting past this intial hurdle will allow me to finally concentrate on the content rather thant he delivery mechanism.

Read more

Share Comments