Jump to content

Wrong binding?


xoxys

Recommended Posts

Hi,

i try to bind emby to a separate virtual ip on my server:

eth0:
    inet 192.168.0.2/25 brd 192.168.0.127 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.0.6/25 brd 192.168.0.127 scope global secondary eth0:1
       valid_lft forever preferred_lft forever

In the web gui i have set the binding to 192.168.0.6 and restarted the server but it seem emby is still binded to both. After a short test, there is following situation:

 

192.168.0.2:8096  -> is not working (Invalid host)

hostname:8096 ->  WORKING (DNS Record is an A-Record linked to 192.168.0.2)

 

Is this the normal behavior?

 

Thanks,

Robert

Edited by xoxys
Link to comment
Share on other sites

We should re-label the setting. We always bind to all available addresses, but the setting simply acts as a filter for what traffic we'll listen to.

Link to comment
Share on other sites

Okay but the question is, why? Why not bind only to the specified IP? The filter actually not handle DNS Names that means access with an invalid IP is blocket, acces with a corresponding hostname not. I think this is no consistent behavior.

Link to comment
Share on other sites

The short answer is that it's simple and easy. We can use one single socket for all transmissions, with the socket being bound to ip address 0.0.0.0. And we also take operating system-specific discrepancies out of the equation. If instead we bind sockets to specific addresses, then we need a separate socket for every possible address and then it gets a little more complex.

Link to comment
Share on other sites

Sounds clear. But is there any Chance to fix the hostname issue? The other thing i dojt understand, why you need multiple sockets? For me its sounds like two possible options:

1. no bind IP specified -> use socket 0.0.0.0

2. bind IP specified -> use socket with bind IP

For now there is no Option to bind to multiple specified ip's right? So in both cases you need one socket only the bind Adresse is different. Do i miss something?

 

A possible workaround would be using iptables to prevent connections on all interfaces but i would prefere a emby solution because it is mor clean.

Edited by xoxys
Link to comment
Share on other sites

Because when you bind to specific IP, at the very least we need a socket for that IP + 127.0.0.1. Is that a major deal? No, but now we have to handle situations where one succeeds to bind and the other fails, and so part of this is just about reducing potential troubleshooting.

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