Jump to content

Option to set IP as external


daschef

Recommended Posts

daschef

Hi,

 

i am using VPNs to access Emby. Unfortunately some VPN clients get IPs inside the servers range and are treated as local, so no bandwith throttling occurs.

There is the option to set local networks, but the server's subnet is always treated as local.

 

An option to set IPs or IP ranges always as external would help a lot!

 

Thanks!

Link to comment
Share on other sites

Why?

Why would you want to do this?  VPNs at best hide your identity from those without the power to figure out who your are (your IP).

If you turn around and tell them "this is my server" and here's an app for accessing it then what are you hiding? Surely not your identity anymore.

 

The VPN will do no good for your Emby server and just get in the way adding latency to every packet sent as well as slow down your overall throughput.

 

I'm not saying you don't have a need for a VPN for other purposes but you should run it on a different machine or VM then where Emby runs.

Link to comment
Share on other sites

daschef

I am using different vpns to access my emby server over the internet.

 

I have no problems with an OpenVPN server and a Strongswan server on the emby machine (access is treated as external).

 

Unfortunately i also use the OpenVPN server on a Synology device on the internal network. OpenVPN on Synology does IP masquerading, that means that access over this VPN seems to come from the Synology for the emby server.

 

All i want is to treat the IP of the Synology as external, so the bandwith throttling applies.

 

I do not use public VPN services like nordvpn etc.

Edited by daschef
Link to comment
Share on other sites

Got ya.  The easy fix if possible is change the IP range used on the Synology device so it doesn't look like an internal IP.

There might be a better way that also easier.

 

What are the different IP ranges being used internally on your network (normal and VPN)?

Link to comment
Share on other sites

daschef

Hi Luke,

 

sorry that is not true.

My network is named 172.16.128.0/24

 

If i set the local network to 172.16.128.0/25, only the IPs 172.16.128.1 to 172.16.128.126 should be local for emby.

 

The logs show this:

Info App: RemoteClientBitrateLimit: 2500000, RemoteIp: 172.16.128.200, IsInLocalNetwork: True

The Test Movie plays direct with 7 MBits.

 

I think emby treats its own network always as local.

Edited by daschef
Link to comment
Share on other sites

daschef

Here you get the screens and logs.

5bb526b6b9700_2018100322_26_33YourNameGe

 

5bb5270df0139_local.png

 

at 22:09 a Friend used emby over VPN:

Info App: RemoteClientBitrateLimit: 2500000, RemoteIp: 192.168.66.27, IsInLocalNetwork: False

Bandwith throttling was active.

embyserver.txt

Edited by daschef
Link to comment
Share on other sites

If the remote IP is 192.168.66.27, then it is correctly being detected as out of network, right?

Link to comment
Share on other sites

@@Luke, no idea if you wrote the code to check/calculate the subnet masks and what is considered local or not but if it's part of a library someone else wrote it could be flawed.  I've seen

 

10.0.0.0 to 10.255.255.255

172.16.0.0 to 172.31.255.255

192.168.0.0 to 192.168.255.255

 

always report "local" regardless of IP/mask given.  That of course is true they are private addresses but may not be "local".  Anyway, just thought I'd mention it in case you wanted to take a quick look to see how it's implemented.

Link to comment
Share on other sites

That's his problem then since Emby isn't respecting the IP/mask he set.  Look at the address space he is using in #6.

Edited by cayars
Link to comment
Share on other sites

but 192.168.66.27 was detected as external ...

And it should be if you have:172.16.128.0/25

192 vs 172 C block

 

I'm not sure how Emby is coded but if you remove the 172.16.128.0/25 then Emby may use all the private address spaces as local and then this IP would be considered local.  But you over road what Emby normally considers local.

 

If you want the 172.16.66.xx range to also be local then add this to the list of your local networks.

Edited by cayars
Link to comment
Share on other sites

RobWayBro

Actually, I suspect using /25 does not include .254  Are you really dividing your network?  If not, maybe try /24 which will include all 255 ip addresses.  With /25 sets the host max to .126

Link to comment
Share on other sites

Hi Luke, not really, with 172.16.128.0/25 as local net, 172.16.128.254 is still treated as internal ...

That's incorrect.  It should be external based on /25.

172.16.128.1 - 172.16.128.126 would be internal IPs with that mask.

 

For anyone sort of following but not sure, just use an online calc like this one: http://www.subnet-calculator.com/

 

@daschef what exactly are you trying to accomplish?  Maybe we can help with another simple way to accomplish it.

Edited by cayars
Link to comment
Share on other sites

daschef

again:

 

- my net here is 172.16.128.0/24

- i want to accomplish that 172.16.128.254 is OUTSIDE the local net for emby, so bandwith throttling occurs

- setting the local net in emby to 172.16.128.0/25 does not help, 172.16.128.254 is still treated as internal ip

Link to comment
Share on other sites

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...