Linux DVR hdhomerun_record firewall rules

Help and support for HDHomeRun DVR and HDHomeRun software for Windows 10, Mac, Android, XBox, etc.
Post Reply
mhometv
Posts: 4
Joined: Tue Jan 30, 2024 5:32 pm

Linux DVR hdhomerun_record firewall rules

Post by mhometv »

I followed the instructions in: https://info.hdhomerun.com/info/linux on a desktop linux machine I have, just to figure out the DVR stuff.
I am planning on doing something more permanent (like a raspberry Pi I leave on all the time) after I finish experimenting, but this initial try failed and I am trying to get information on what to troubleshoot.

The hdhomerun_record command start worked fine, and the status shows active, but when I go to the App running on my Android phone and go to the "Recorded" tab, I get the message:
"Your HDHomeRun DVR wasn't found"

Eventually I took a look and the ufw firewall is enabled and denying incoming traffic.
By allowing incoming traffic I was able to at least get it to record.

What is the expected traffic pattern from the HDHomeRun so I can set up appropriate rules

mhometv
Posts: 4
Joined: Tue Jan 30, 2024 5:32 pm

Re: Linux DVR hdhomerun_record firewall rules

Post by mhometv »

Well I guess I should have kept looking:

Here's the document I needed
https://info.hdhomerun.com/info/dvr:tro ... 1#firewall

nickk
Silicondust
Posts: 20210
Joined: Tue Jan 13, 2004 9:39 am
x 383

Re: Linux DVR hdhomerun_record firewall rules

Post by nickk »

That's it...

UDP port 65001 for discovery, and a TCP port of your choice for control.

mhometv
Posts: 4
Joined: Tue Jan 30, 2024 5:32 pm

Re: Linux DVR hdhomerun_record firewall rules

Post by mhometv »

So I tried out those instructions and added them to my host firewall (ufw), but I also had to add a rule
to allow anything from the tuner IP. I noticed on lsof that there were a couple of UDP ports
that were being opened by hdhomerun_record that changed from invocation to invocation, so maybe that's what is tripping it up.

Seems like there might be another port or some kind of stateful rule required? I didn't try to put in a log rule before drop yet.

mhometv
Posts: 4
Joined: Tue Jan 30, 2024 5:32 pm

Re: Linux DVR hdhomerun_record firewall rules

Post by mhometv »

So messing with this a bit further I looked at the ufw logs when I turned off the allow from host, and saw that the packets were coming in from UDP 65001 but going to another destination UDP port, so my previous firewall rule was written as allowing packets with a destination port of 65001, and instead should have been written as allowing packets with a source port of 65001.

This was what I added:
ufw allow proto udp from <host> port 65001 to any

Not sure how to explain this better, but hopefully this will help someone else.

jasonl
Silicondust
Posts: 16836
Joined: Sun Oct 28, 2007 9:23 pm
x 64

Re: Linux DVR hdhomerun_record firewall rules

Post by jasonl »

The app discovering the DVR needs from any to 65001, the DVR discovering the HDHomeRun needs from HDHomeRun port 65001 to any.

Post Reply