Operating System Server 2012R2 - Site to Site VPN (1 Viewer)

xPETEZx

Portal Member
August 6, 2010
36
1
England England
Country flag
Hey Guys,

For years I have never had MediaPortal TV server work over VPN. I never dedicated too much time to it, and just used AMPdroid to watch TV when away from home.

Today I finally spent some time on it, and found the cause of the issue. Although I was defining my TV server by IP, it showed in logs that somewhere it was trying to resolve the host name.
I created a static entry in my hosts file, and lo-and behold, TV server works over VPN.

Now is where I am stretching....Site-to-Site VPN...

I have setup a Site-to-site VPN between 2 location, and was hoping to be able to use MediaPortal TV server at the remote location.
Routing works fine between the sites, can ping/access file shares/telnet etc etc.

However TV Server does not work. I can get to the EPG (which is further than I could without the Host file entry) but when I try and stream I get a "Stream failed" error.

I figure its something about how the stream is setup and transversing subnets isnt expected?

Basically subnet 1 is:

192.168.5.x
and subnet 2 is
192.168.10.x

As I said, routing works fine between the too.
The site to site is setup via 2x Server 2012R2 RRAS servers. (IKE tunnel)

This is more of a "be awesome if it worked" project than essential. (As I can use VPN to make it work)
But would love some feedback from anybody who has made it work.

Cheers
 

mm1352000

Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    but when I try and stream I get a "Stream failed" error.
    Probably an issue with the RTSP/RTP connection. Maybe a firewall or something? The RTSP connection (for streaming control) requires the client to be able to access port 554 on the server, so should be easy to configure. The RTP connection (for carrying video, audio etc.) uses random ephemeral ports, so can be harder to configure. You may want to consider switching to UNC paths (SMB shares).
     

    xPETEZx

    Portal Member
    August 6, 2010
    36
    1
    England England
    Country flag
    Thanks

    How would switching to UNC paths help? Would it not end up using the IP anyway after its resolved?

    Will take a look at the ports and see if 554 is blocked anywhere on the RRAS.
     

    xPETEZx

    Portal Member
    August 6, 2010
    36
    1
    England England
    Country flag
    Alright...solved it.

    Apparently it was not only using host name, it also seemed to be trying to use the FQDN?
    I had only created a hosts file entry for the host name, not FQDN.
    Added another entry for FQDN and all worked!

    What I find surprising in all this thought, is that nowhere in my client config have I specified the host name. ITs just by IP.

    Where is it getting the Hostname/FQDN from? Is that passed from the server to the client at some point?
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    Alright...solved it.
    Thanks for reporting the solution - surely helpful for other people who may be looking to do the same as you. :)

    How would switching to UNC paths help? Would it not end up using the IP anyway after its resolved?
    It would end up using the IP address, but at the time I responded it wasn't clear whether the problem was blocked/unavailable ports, firewall configuration, DNS etc. Like I said previously: UNC paths can be easier to manage/configure from a port and firewall perspective.

    Where is it getting the Hostname/FQDN from? Is that passed from the server to the client at some point?
    I can't give a certain answer, but the following information might give you some clues...

    There are 3 types of connections between MediaPortal and TV Server:
    1. .NET remoting (port 31456) - this is used for the command/control connection (eg. start time-shifting, create a new schedule etc.).
    2. Database (MySQL port 3306; SQL Server ports 1433 and 1434) - this is used to retrieve and/or save information from/in the TV Server database.
    3. Streaming (RTSP port 554 and RTP ephemeral ports; UNC/SMB port 445) - this is used to stream live TV and/or recordings, or read time-shift and/or recording files directly from the server.
    (Note: the list of ports mentioned above is not intended to be exhaustive. Ports 137-139 may be needed for NetBIOS/DNS; ports 31457 and 31458 may be needed for the PowerScheduler plugin etc. etc. etc.)

    All of the above connections have separate configuration.

    .NET remoting connection configuration is the IP address or host name entered in MediaPortal Configuration.
    Database connection configuration is the gentle.config file copied from the server (c:\ProgramData\Team MediaPortal\MediaPortal TV Server) to the client (c:\ProgramData\Team MediaPortal\MediaPortal). That file is created/configured when you first install TV Server.
    Streaming configuration is the IP address selected in TV Server Configuration.

    If you want to know why the hostname is used then start by checking the configuration for those three connections. I can't guarantee that one of them will be the source... but that is the most likely situation.
     

    xPETEZx

    Portal Member
    August 6, 2010
    36
    1
    England England
    Country flag
    Thanks for the information.

    I had a look:

    So for
    1.) I have set the IP of the server
    2.) This value has just hostname
    3.) This was set to "Auto", I have now manually selected my IP from the drop down.

    After selecting an IP from the drop dwon for number 3, I could remove the hosts file entry from my remote client for the FQDN.

    If I could set the database connection value to IP too, I would note need a host file entry anymore at all.

    Would like to avoid statically setting the IP anywhere though. Have visions of some time in the future me changing the server IP and having all sorts of problems trying to figure out whats going on.

    Either way, this is all academic really. I know now all I need to do is make sure the hostname can be resolved on the remote network. Either by hosts file or other resolution.
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    If I could set the database connection value to IP too, I would note need a host file entry anymore at all.
    You can do this. Just edit the gentle.config file on both server and client. I gave you the location(s) of the file in my previous reply.
     

    xPETEZx

    Portal Member
    August 6, 2010
    36
    1
    England England
    Country flag
    So is this value static?

    If the hostname of the system was changed, would this file be updated?

    If I statically set the IP in this file, Id be worried that years/months down the line I forget I set it in this file.

    I am happy with the solution for now.
    On any remote system I just add a hosts entry.
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    So is this value static?
    Yes. It is your configuration. You can set it to be whatever you like. :)

    If the hostname of the system was changed, would this file be updated?
    No. As above. The file is created at install time and never changed by TV Server after that. Of course you can manually change it at any time, but most people don't.

    If I statically set the IP in this file, Id be worried that years/months down the line I forget I set it in this file.
    Personally I don't understand why this file would be any harder to remember than the other 2 places where the IP address is also set. ;)

    I am happy with the solution for now.
    On any remote system I just add a hosts entry.
    Sure. Ultimately the choice about how you configure your system is completely up to you. :)
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    M TV Server Preview Window is blank, sounds works Television (MyTV frontend and TV-Server) 3
    catalpa ...immer mal wird der Server abgekoppelt :( Allgemeines Support- und Diskussionsforum 0
    A Keine Verbindung mit Kodi auf Server Allgemeines Support- und Diskussionsforum 11
    CyberSimian Unhandled exception in TV Server TV-Server 0
    Grisu002 Failed to startup - TV Server funktioniert nicht Allgemeines Support- und Diskussionsforum 0
    ajs [WiP] 5030: Add UHD Thumb size to TV Server MediaPortal 1 0
    toricred [solved] Configuring TV Server to use NAS General 1
    T Client / Server slow channel-to-channel change (zapping) General Support 1
    T Server / client channel logo location Installation, configuration support 6
    framug [solved] Some changes/fix in MP1 configuration client and server Submit: code patches (MediaPortal/TV-Server/etc.) 14
    S TV-Server MP1 - Automatic search doesn't work Installation, configuration support 2
    M TV Server can't tune to some DVB-S multiplexes while other software can General 0
    J TV Server setup question Newcomers Forum 0
    D [solved] Changed username in Win10, now TV Server config crashes on fresh install Installation, configuration support 1
    I [solved] Connection to TV Server MySQL General Support 8
    mrmojo666 [Tv Server Plugin ]Direct Show Video Control Plugin 0.0.0.1 for Hauppauge PVR cards MediaPortal 1 Plugins 0
    F After resume, TV Server connection screen is shown General Support 4
    R TV server crash with WintTV quadHD General 0
    R MP Server und Fileshare Einsteigerforum 4
    R [further infos missing] some movies freezing evry seconds Submit: Bug Reports 9
    I MP Server goes into suspend, because it doesn't detect the MP Client General Support 6
    S software to send analog to iptv server OffTopic 11
    geeky_herman Recent server upheaval with thegamesdb.net My Emulators 0
    Lehmden [WiP] [MP2-824] DLNA Server functionality MediaPortal 2 27
    A Client/Server Setup: Slow TV Startup Television (MyTV frontend and TV-Server) 0
    Similar threads

























    Top Bottom