Project

General

Profile

Connect remotly to TVHeadend server that uses VPN.

Added by Michael Berg 22 days ago

Hi all,
I wonder if someone could please help me out.
I have setup a TVheadend server (Ubuntu) with IPTV muxes (for internet source) and the TVheadend server is connecting to this source via a VPN Gateway.
Streaming on the internal lan including EPG works great from my TVheadend server.
I now have family living in Australia (kodi with TVHeadend client) who would like to watch local TV, which is provided by the internet stream on my TVheadend server.
If I forward 9981/9982 the stream won't work if VPN is connected ( works on local LAN )
If I disconnect the VPN on the TVheadend server the stream is fine.

I had a quick look and there seems to be an option via split vpn tunnelling but I am not quit sure yet how to set this up yet ?
Is there any other solution to this please ?
For example setup a second TVheadend server connect both and stream from the non VPN connected server with external ports 9981/9982 ?

Any ideas would be great without disconnecting the VPN.
Thanks


Replies (10)

RE: Connect remotly to TVHeadend server that uses VPN. - Added by saen acro 21 days ago

No problem with vpn tunnel on my setup.
Modern router's support it, no end user changes needed.

RE: Connect remotly to TVHeadend server that uses VPN. - Added by Michael Berg 21 days ago

Thanks for your reply.
My router is quit modern, but my TVheadend server don't use my Router as VPN gateway, I got another VPN server on the network.

Any other ideas ?

RE: Connect remotly to TVHeadend server that uses VPN. - Added by saen acro 21 days ago

Give example what you do,
and what's is not going on.
How you try to redirect etc.

RE: Connect remotly to TVHeadend server that uses VPN. - Added by Michael Berg 21 days ago

Sorry I don't understand what you mean as I have explained the scenario in my original question ?
I'd like to stream to the internet (external port 9981) with the TVH server still connected to VPN.

RE: Connect remotly to TVHeadend server that uses VPN. - Added by saen acro 21 days ago

Michael Berg wrote:

Sorry I don't understand what you mean as I have explained the scenario in my original question ?
I'd like to stream to the internet (external port 9981) with the TVH server still connected to VPN.

You see it on front of you we not.
What software you use and how you try to do it?

RE: Connect remotly to TVHeadend server that uses VPN. - Added by Michael Berg 21 days ago

No offence mate, anyone else please who understands what I mean ?

RE: Connect remotly to TVHeadend server that uses VPN. - Added by Michael Berg 21 days ago

Ok I have sorted it with a second TVH server.
THV with VPN:9981 <-- THV without VPN:9981 <-- Router:PORTXXXXX <-- Family living in Australia

Works great, but if someone knows a solution with one TVH only would be great ;)

Thanks

RE: Connect remotly to TVHeadend server that uses VPN. - Added by Hiro Protagonist 21 days ago

I'm assuming you are port forwarding from your router to port 9981 on your TVH machine?

This script allows traffic incoming on eth0 to exit via eth0 [i.e. not via the VPN]:

#!/bin/bash
GW=192.168.1.254
HOST=$(hostname -I | cut -d ' ' -f 1 )
NET=192.168.1.0/24
DEV=eth0

ip route add default via $GW dev $DEV table 22
ip route add $NET dev $DEV src $HOST table 22
ip rule add from $HOST table 22
ip rule add from all to $HOST dev $DEV table 22
ip route flush cache

You may need to edit GW (IP address of router), NET (Your LAN) or DEV (ethernet device connecting to your LAN)

RE: Connect remotly to TVHeadend server that uses VPN. - Added by Michael Berg 21 days ago

I see what your script does, but if it adds my default GW it won't use the VPN connection, which is currently my default GW
Default GW 192.168.0.1
VPN Server as GW 192.168.0.2

[email protected]:~# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.0.2 0.0.0.0 UG 0 0 0 ens160
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160

192.168.0.2 is a local VPN server on my lan connected to VPN and some devices on my LAN (including TVH) use the VPN GW.

RE: Connect remotly to TVHeadend server that uses VPN. - Added by saen acro 20 days ago

No reverse NAT rule.
if vpn is on router will work on start,
else routing and redirecting.

    (1-10/10)