TVHeadend + VPN
I've searched and found some older threads related to my question, but no definitive answer that works for me.
I've got the Libreelec TVHeadend addon, with DVB-T and IPTV muxes. For the IPTV muxes, I'd like to find a way to funnel the requests to them from TVHeadend via my VPN.
As I see it, with my setup there's a few ways this might be possible...
1) Send all IPTV requests through a proxy to a container with my VPN (proxy is ready and set up). I tried the instructions here — https://tvheadend.org/boards/4/topics/34469 — replacing the 'VPN_ADDRESS' with my proxy IP, but it didn't work — the log suggests TVHeadend didn't like the wget
2) Bind all IPTV requests to the IP address for my VPN interface. Same instructions — https://tvheadend.org/boards/4/topics/34469 — but now replacing the 'VPN_ADDRESS' with the IP for the network interface for my VPN. Again the log suggests TVHeadend didn't like the wget (can post the log for more details if needed)
3) Bind all IPTV requests to the IP address for my VPN interface (option 2) — On the 'edit mux' screen for each mux, set 'Interface' to be the interface for my VPN. I've tried this, and it doesn't seem to have any effect. I've seen another old post that suggested this option didn't have any effect.
4) Bind the whole of the TVHeadend addon to the network interface for my VPN. Not sure how this would be done, but if it's possible that would solve my problem.
5) Send all TVHeadend requests via my proxy. Again not sure how this would be done, but if it's possible that would solve my problem.
Very happy to provide any further info needed — thanks in advance for your help!
RE: TVHeadend + VPN - Added by Hiro Protagonist 4 months ago
For 1) and 2) it would be helpful to post the actual configuration you tried, and post the actual log entries that resulted.
If you have the VPN running in a container, can you not run TVH in the container too?
RE: TVHeadend + VPN - Added by Graham Farnell 4 months ago
Thanks for your reply. In the end, I didn't get any of the options I listed above working. But I did get it working with an alternative strategy, which is along the lines of what you suggested. Although TVHeadend and the VPN need to be in separate docker containers, I was able to set the network for the TVHeadend container to be the network of the VPN container.
This required me to change from using the Kodi TVHeadend server addon to the linuxserver.io TVHeadend docker container (as a Kodi add-on). Once I was using that, it was just a case of adding --net=container:vpn (with vpn being the name of my vpn container) to the additional parameters that the linuxserver.io TVHeadend docker container Kodi add-on allows you to enter. And that did it — all TVHeadend data was then going through my VPN.
FYI for anyone who happens to read this... I also had to add --privileged to the additional parameters in order to get my DVB tuners passed through to the TVHeadend container. There's an option on the linuxserver.io TVHeadend docker container Kodi add-on to pass through DVB tuners but using that seemed to break things. The --privileged line got it working.