daschef 9 Posted October 3, 2018 Posted October 3, 2018 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!
Carlo 4477 Posted October 3, 2018 Posted October 3, 2018 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.
daschef 9 Posted October 3, 2018 Author Posted October 3, 2018 (edited) 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 October 3, 2018 by daschef
Carlo 4477 Posted October 3, 2018 Posted October 3, 2018 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)?
Luke 38803 Posted October 3, 2018 Posted October 3, 2018 If you set the local network, then anything outside of that will be considered external.
daschef 9 Posted October 3, 2018 Author Posted October 3, 2018 (edited) 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 October 3, 2018 by daschef
Luke 38803 Posted October 3, 2018 Posted October 3, 2018 Please see how to report a problem. Thanks !
daschef 9 Posted October 3, 2018 Author Posted October 3, 2018 (edited) Here you get the screens and logs. 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 October 3, 2018 by daschef
Luke 38803 Posted October 4, 2018 Posted October 4, 2018 If the remote IP is 192.168.66.27, then it is correctly being detected as out of network, right?
Carlo 4477 Posted October 4, 2018 Posted October 4, 2018 @@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.
Luke 38803 Posted October 4, 2018 Posted October 4, 2018 Anything in private address space we do assume local, yes.
Carlo 4477 Posted October 4, 2018 Posted October 4, 2018 (edited) 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 October 4, 2018 by cayars
daschef 9 Posted October 5, 2018 Author Posted October 5, 2018 but 192.168.66.27 was detected as external ...
Carlo 4477 Posted October 5, 2018 Posted October 5, 2018 (edited) 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 October 7, 2018 by cayars
daschef 9 Posted October 5, 2018 Author Posted October 5, 2018 Hi Luke, not really, with 172.16.128.0/25 as local net, 172.16.128.254 is still treated as internal ...
RobWayBro 27 Posted October 5, 2018 Posted October 5, 2018 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
daschef 9 Posted October 5, 2018 Author Posted October 5, 2018 Hi RobWayBro, that is exactly what i want. I want that 172.16.128.254 excluded from the local net.
Carlo 4477 Posted October 6, 2018 Posted October 6, 2018 (edited) 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 October 7, 2018 by cayars
daschef 9 Posted October 6, 2018 Author Posted October 6, 2018 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
daschef 9 Posted October 6, 2018 Author Posted October 6, 2018 sure, but in /24 172.16.128.254 is included ....
daschef 9 Posted October 6, 2018 Author Posted October 6, 2018 because with /24 172.16.128.254 is internal and i don't want this
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now