Project

General

Profile

tvheadend, OpenVPN, KODI. How to reach tvheadend from internet?

Added by Jan Kowalski about 7 years ago

Hi,

At home I have Raspberry Pi with USB DVB-C dongle and all is working great with LibreELEC. I would like to have ability to watching TV stream from this raspberry from any place in the world. At home I haven't "external" IP address.

So, I bought VPS where I installed OpenVPN Server. I configured LibreELEC to connect as client to OpenVPN. All working great - LibreELEC has IP from my VPS.

I would like reach tvheadend by putting IP address of my VPS. For example http://IP_OF_MY_VPS:9981

Anyone know how to do this?


Replies (8)

RE: tvheadend, OpenVPN, KODI. How to reach tvheadend from internet? - Added by saen acro about 7 years ago

Is your VPN provider allow incoming connection?
test with some external service for example
https://portchecker.co

VPS is other thing Virtual Private Server

RE: tvheadend, OpenVPN, KODI. How to reach tvheadend from internet? - Added by Jan Kowalski about 7 years ago

Maybe I'm wrong, but I think my internet provider doesn't matter in this thing.

My Raspberry Pi is connected as client with OpenVPN serwer on my VPS serwer somwhere in Europe. This mean that Raspberry Pi then has IP from my VPS. Problem is to "reach" Raspberry from any place. In my opinion this require some OpenVPN Server configuration.

RE: tvheadend, OpenVPN, KODI. How to reach tvheadend from internet? - Added by saen acro about 7 years ago

VPS is some VIRTUAL PC on server of provider,
you need port redirection in this case.

Or you can install TVHeadend directly on VPS and use IPTV source from your PI.

RE: tvheadend, OpenVPN, KODI. How to reach tvheadend from internet? - Added by Jan Kowalski about 7 years ago

saen acro wrote:

Or you can install TVHeadend directly on VPS and use IPTV source from your PI.

This is interesing. But if I install tvheadend on VPS and configure with IPTV as video source, my raspberry will stream video constatnly or just when I start watching video?

RE: tvheadend, OpenVPN, KODI. How to reach tvheadend from internet? - Added by Jan Kowalski about 7 years ago

At the moment I'm trying first option - port forwarding to my Raspberry Pi with tvheadend. Raspberry is connected to the VPS through OpenVPN as client and has static IP 172.26.0.3.

If I make this command on VPS, still cannot connect to tvheadend on my Raspberry from internet:

iptables -t nat -A PREROUTING -i eth0 -d [HERE VPS_IP] -p tcp --dport 9981 -j DNAT --to-destination 172.26.0.3

RE: tvheadend, OpenVPN, KODI. How to reach tvheadend from internet? - Added by Jan Kowalski about 7 years ago

Ok, is working :)

Need to set iptables command:

iptables -t nat -I PREROUTING -p tcp -i eth0 --dport 9981 -j DNAT --to RASPBERRY_INTERNAL_IP:9981
iptables -I FORWARD -p tcp -d RASPBERRY_INTERNAL_IP --dport 9981 -j ACCEPT

BUT.... Problem is that for streaming I need HUDGE upload amount from home network to VPS. Is possible to set tvheadend to less quality for streaming?

RE: tvheadend, OpenVPN, KODI. How to reach tvheadend from internet? - Added by David Silva over 6 years ago

can you post your iptables? Im trying to do the same and I cant seem to get it to work. Cheers

    (1-8/8)