Daniel Morgan wrote:
> That's brilliant thank you soo much!! Really well explained and appreciate you going into detail!!
>
You're welcome.
Daniel Morgan wrote:
> The only questions I have from that is I'm assuming I choose and set my own port number for external TVH. However I would assume whichever number I use I will have to assign that within the web interface somewhere? So that the network knows what device I'm wanting to connect too?
>
> If so how is this done?
>
> Secondly would one port number be for external access to the web interface and a different port number be for external access to be used with a front end like Kodi on my mobile phone, so that the channel guide all shows up?
>
No. No changes are needed to the TVH configuration.
+*Internal (Local Network) Access*+
Everything works as it does now. Ports 9981 (web interface) and 9982 (HTSP) are used.
+*External Access*+
Let's assume that your TVH server has a local network address of 192.168.1.10.
Configure two port forwarding rules on your router as follows:
Rule1:
External Port: 49981
Internal IP: 192.168.1.10
Internal Port: 9981
Protocol: TCP
Rule2:
External Port: 49982
Internal IP: 192.168.1.10
Internal Port: 9982
Protocol: TCP
What this is doing is telling your router to forward everything received externally (from the Internet) on port 49981 to the local (internal) address of TVH on port 9981. The router is doing the port mapping/translation for you. As far as TVH is concerned, the traffic is received on the normal 9981 port. The same applies for port 49982 being forwarded to port 9982.
To access the web interface from the Internet you'd browse to:
"http://<Your EXTERNAL IP address>:49981"
For Kodi access when you're not on your local network you'd need to reconfigure the TVH PVR Client in Kodi.
In Kodi, go to "Settings/Add-ons/My add-ons/PVR clients/Tvheadend HTSP Client". Once there click on "Configure". You should be at a page similar to the attached screenshot. Change the "Tvheadend hostname or IP address" to your EXTERNAL address and the HTTP/HTSP ports to 49981 and 49982 respectively. After doing this you should be good to go.
One last thing ... I believe that by default, the TVH Kodi PVR Client will use the "admin" user. It's worth double checking the TVH configuration for this user under "Configuration/Users/Access Entries" in the TVH web interface. IIRC, the default value for "allowed networks" is "0.0.0.0/0" which would be fine. If you have anything else for this setting, change it to "0.0.0.0/0".