Jump to content

VPN connection not detected as remote


Go to solution Solved by Apotropaic,

Recommended Posts

Posted

Hi. I have an OpenVPN server running on my home router that I'm using to access my LAN remotely. That way I can connect to Emby without port forwarding.

For the most part it's working fine but the VPN IP is not detected as a remote IP and Emby is acting as if it was on my LAN, resulting in DirectPlay which my bad upload speed can't handle.

 

I have the following settings:

Expert -> Advanced -> LAN Networks: 172.25.14.0/24

Playback -> Streaming -> Internet streaming bitrate limit (Mbps): 0.5

 

I have tried port forwarding and accessing the server using my public IP and the bitrate limit is applied correctly.

The issue is only when I'm connected with the VPN (subnet 172.25.100.0/24).

 

In the server logs, I believe the important part is at 2018-02-27 11:35:38.703 (RemoteIp: 172.25.100.2, IsInLocalNetwork: True)

 

Summary:

Local subnet: 172.25.14.0/24

VPN subnet: 172.25.100.0/24

I want the VPN subnet to be detected as "Remote".

 

Thanks!

server-63655327984.txt

Apotropaic
Posted

Hi. I have an OpenVPN server running on my home router that I'm using to access my LAN remotely. That way I can connect to Emby without port forwarding.

For the most part it's working fine but the VPN IP is not detected as a remote IP and Emby is acting as if it was on my LAN, resulting in DirectPlay which my bad upload speed can't handle.

 

I have the following settings:

Expert -> Advanced -> LAN Networks: 172.25.14.0/24

Playback -> Streaming -> Internet streaming bitrate limit (Mbps): 0.5

 

I have tried port forwarding and accessing the server using my public IP and the bitrate limit is applied correctly.

The issue is only when I'm connected with the VPN (subnet 172.25.100.0/24).

 

In the server logs, I believe the important part is at 2018-02-27 11:35:38.703 (RemoteIp: 172.25.100.2, IsInLocalNetwork: True)

 

Summary:

Local subnet: 172.25.14.0/24

VPN subnet: 172.25.100.0/24

I want the VPN subnet to be detected as "Remote".

 

Thanks!

I wonder if the LAN configuration within Emby is coded using classful subnetting, where any 172. address would be a class B. So both your /24 networks emby is handling as a single 172.25.x.x network.

 

Emby really should be ignoring the class boundary's and be using classless subnetting.

 

Sent from my ONEPLUS A5000 using Tapatalk

Posted

I think it's more a case of which IP is used to access the Emby server.

When I'm on the VPN, I'm using the local IP (172.25.14.63) to access it, whereas with port forwarding, I'm using the public IP.

Emby is probably skipping the "LAN Networks" check when it's being accessed via its local IP.

  • Solution
Apotropaic
Posted

I think it's more a case of which IP is used to access the Emby server.

When I'm on the VPN, I'm using the local IP (172.25.14.63) to access it, whereas with port forwarding, I'm using the public IP.

Emby is probably skipping the "LAN Networks" check when it's being accessed via its local IP.

 

I'm not entirely sure what you mean there, I assume even with your port forwarded external traffic it is being NAT'd by your firewall/router to the same Emby IP and Port, so the actual connection to Emby is the same regardless if you're on the LAN, VPN or External.

 

Do your LAN users and VPN users access Emby on the same IP and port?

 

Maybe I never explained my thoughts earlier, an Internet user I imagine is determined by the source IP of the user not being in the same IP range as the internal emby server LAN IP.

Taking this logic further the VPN users should also be considered as external as their IP range is not within the LAN IP range, if Emby has been coded to use 'Classless' networking. But here is where you are saying they aren't.

 

I'm not an Emby dev so i don't know how it is coded but a reasonable explanation would be that emby is seeing 172.25.14.0/24 & 172.25.100.0/24 as the same subnet. This would make sense if Emby was coded with 'Classful' networking.

 

A simple test would be to re-address your VPN subnet to another 172.16-31.x.x subnet, or to a 192.168.x.x subnet if you're not sure about subnet masks etc. Emby should now see the VPN users as remote.

  • Like 1
Posted

Emby can still see the IP address used to access it by looking at the "Host" field of the HTTP header.

I think Emby may be using that field because this is what I'm seeing in the logs (I'm seeing the public IP address in the logs when I do requests from the Internet).

 

However, I followed your suggestion and changed my VPN subnet, and it appears you are right. I did a couple tests:

Change subnet to 172.18.10.0/24: Same thing as before, it results in DirectPlay

Change subnet to 192.168.x.x: It works, the playback is getting transcoded at the bitrate I supplied in the "Internet streaming bitrate limit (Mbps)" field.

 

After that successful 192.168 change, I also tried emptying the "LAN Networks" field just to test, and it resulted in DirectPlay again.

 

So if the "LAN Networks" field is set and I use my VPN subnet to something other than 172.x.x.x, it works as expected.

 

Thanks for the suggestion!

  • Like 1
Posted

Great investigation on this !

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...