Jump to content


Photo

Option to set IP as external

IP external

  • Please log in to reply
40 replies to this topic

#1 daschef OFFLINE  

daschef

    Advanced Member

  • Members
  • 45 posts
  • Local time: 11:03 AM

Posted 03 October 2018 - 06:06 AM

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!



#2 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2968 posts
  • Local time: 04:03 AM

Posted 03 October 2018 - 07:39 AM

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.



#3 daschef OFFLINE  

daschef

    Advanced Member

  • Members
  • 45 posts
  • Local time: 11:03 AM

Posted 03 October 2018 - 08:15 AM

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, 03 October 2018 - 08:16 AM.


#4 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2968 posts
  • Local time: 04:03 AM

Posted 03 October 2018 - 12:18 PM

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)?



#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142291 posts
  • Local time: 04:03 AM

Posted 03 October 2018 - 12:55 PM

If you set the local network, then anything outside of that will be considered external.



#6 daschef OFFLINE  

daschef

    Advanced Member

  • Members
  • 45 posts
  • Local time: 11:03 AM

Posted 03 October 2018 - 04:16 PM

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, 03 October 2018 - 04:18 PM.


#7 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142291 posts
  • Local time: 04:03 AM

Posted 03 October 2018 - 04:16 PM

Please see how to report a problem. Thanks !



#8 daschef OFFLINE  

daschef

    Advanced Member

  • Members
  • 45 posts
  • Local time: 11:03 AM

Posted 03 October 2018 - 04:33 PM

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.

Attached Files


Edited by daschef, 03 October 2018 - 04:36 PM.


#9 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142291 posts
  • Local time: 04:03 AM

Posted 03 October 2018 - 11:17 PM

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



#10 daschef OFFLINE  

daschef

    Advanced Member

  • Members
  • 45 posts
  • Local time: 11:03 AM

Posted 04 October 2018 - 02:36 AM

that's right.



#11 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2968 posts
  • Local time: 04:03 AM

Posted 04 October 2018 - 10:59 AM

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


#12 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142291 posts
  • Local time: 04:03 AM

Posted 04 October 2018 - 12:42 PM

Anything in private address space we do assume local, yes.



#13 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2968 posts
  • Local time: 04:03 AM

Posted 04 October 2018 - 04:40 PM

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, 04 October 2018 - 04:41 PM.


#14 daschef OFFLINE  

daschef

    Advanced Member

  • Members
  • 45 posts
  • Local time: 11:03 AM

Posted 05 October 2018 - 08:01 AM

but 192.168.66.27 was detected as external ...



#15 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2968 posts
  • Local time: 04:03 AM

Posted 05 October 2018 - 10:11 AM

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, 06 October 2018 - 08:14 PM.


#16 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142291 posts
  • Local time: 04:03 AM

Posted 05 October 2018 - 01:59 PM

Thanks cayars. @daschef does this help?



#17 daschef OFFLINE  

daschef

    Advanced Member

  • Members
  • 45 posts
  • Local time: 11:03 AM

Posted 05 October 2018 - 05:28 PM

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



#18 RobWayBro OFFLINE  

RobWayBro

    Advanced Member

  • Members
  • 126 posts
  • Local time: 04:03 AM
  • LocationCentral Indiana

Posted 05 October 2018 - 06:35 PM

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



#19 daschef OFFLINE  

daschef

    Advanced Member

  • Members
  • 45 posts
  • Local time: 11:03 AM

Posted 05 October 2018 - 07:03 PM

Hi RobWayBro, that is exactly what i want. I want that 172.16.128.254 excluded from the local net.



#20 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2968 posts
  • Local time: 04:03 AM

Posted 05 October 2018 - 09:09 PM

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, 06 October 2018 - 08:15 PM.






Also tagged with one or more of these keywords: IP, external

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users