Skip to main content
  1. Argv.Blog/

Building a Remote SDR “Observatory” with Proxmox and Tailscale

799 words·4 mins·
Sdr Rf Linux Aerospace Radio HomeLab Projects

Background && Why
#

Last month, I attended BSides CDMX, where Romel Marin gave a talk on Aerospace Cybersecurity, and it completely hooked me. The subject opened a whole new rabbit hole of curiosity.

At the same conference, I jumped into an RF CTF with my colleagues while having zero experience in RF. They handed us an SDR USB dongle, and… let’s just say I had no clue what I was doing. That experience, combined with some research into aerospace systems and communications over the next few days, made it clear that RF is at the heart of it all.

This project is the first step in that side quest: a way to explore the RF world hands-on, without having to drag my antenna and dongle everywhere.

My goal: turn an RTL-SDR dongle in my homelab into a permanent, remote-access RF observatory, reachable from anywhere via Tailscale, and streamable straight into GQRX (My GUI SDR client on my laptop).

Gear & Software
#

A bit into my SDR and RF research, I ended up buying a Nooelec NESDR Smartee USB Dongle, along with a dipole antenna:

SDR Dongle

For Software, GQRX (Linux, MacOS) has been the most friendly for me, and my RTL Client of choice.

Also, it turns out, rtl-sdr (Linux Package) exposes a TCP service in 0.0.0.0:1234 which opens a TCP stream I can “consume” from an RTL TCP Client (Such as GQRX), so it gave me the idea of maybe setting up an SDR server in my homelab instead of carrying around my antenna everywhere along my laptop…

So I only needed a few things in my Proxmox virtualization server:

  • A small VM (Debian was my choice for this one), which I called “Cascabel”
  • USB Passthrough for the SDR dongle,
  • A Tailscale agent on it to be able to consume RTL TCP data from anywhere, and also for remote administration, of course.
think meme

Architecture
#

I think this architecture is as smart as I can possibly do to achieve my goal, and it’s fairly simple to set up with my existing homelab infrastructure:

image.png

Setup
#

1. Antenna Placement
#

My dipole antenna seems to be enough for my current (beginner) needs, so I just placed it facing the window, 45° up to the sky, and with a coax cable extension to my SDR dongle, connected via USB to my physical server.

2. Virtual Machine Setup
#

Once connecting the SDR dongle to my home server’s USB port, I only needed to set up USB passthrough in:

Proxmox > VM > Hardware > Add > USB Device > Use USB Vendor/Device ID > Select my SDR USB Dongle

image.png

3. Server Software Setup
#

Installation of rtl-sdr:

sudo apt install -y rtl-sdr

RTL Test: This is a command used to perform diagnostic tests on RTL-SDR devices to ensure they are functioning properly:

image.png

It failed because it was bound to my Root user. I could use Root all the time, but let’s not… So let’s fix that.

Fixing Permissions
#

Linux’ udev or device manager needs a rule file for us to explicitly state the permissions needed to access the RTL-SDR device.

The following rule config fixes this permissions by basically saying “Allow any user in plugdev group to access RTL-SDR dongles”.

We need the vendor ID and product ID, and we can get them from the lsusb command (If we have our SDR plugged in):

image.png

File: /etc/udev/rules.d/20-rtlsdr.rules

(”sdrusers” is an arbitrary name I chose for my Linux group, which will inherit this permissions for UDEV)

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE:="0666", GROUP="sdrusers"
# Add my user to the sdrusers group
sudo usermod -aG sdrusers "$USER"

# reload udev rules
sudo udevadm control --reload-rules
sudo udevadm trigger

In Proxmox → VM → Hardware → detach and reattach the USB device (Or physically unplug + plug it back)

rtl_test -t

Success:

image.png

Now we just need to run it, as our normal user. It will generate stdout and be a foreground process:

rtl_tcp -a 0.0.0.0

Before disowning the process and letting it run in the background, I’ll test it out with an RTL TCP client (GQRX).

GQRX (RTL TCP Client)
#

In my Laptop, I just open gqrx (apt install gqrx, or brew install gqrx).

In File > I/O Devices, we set our Device to be RTL-SDR, and specify our tailscale SDR server:

  • Device String: Our SDR Server’s Tailscale IP Address, or hostname (”Cascabel”), and default port 1234
  • Sample Rate: 2048000

image.png

image.png

And it works! 🎊 🎊 🎊 🎊

Setting SDR Server permanently
#

Setting up a shell script, run_rtl_server.sh:

#!/bin/bash
rtl_tcp -a 0.0.0.0 > /home/user/rtl_server.log 2>&1 & disown

(I’m not sure if I’ll ever need it, but all the stdout I’m directing it to a log file just in case).

Copy this shell script to /etc/init.d/run_rtl_server.sh, and chmod +x it, so it’ll run after any reboot.

J Armando G
Author
J Armando G
Cybersecurity & General Tech Enthusiast