Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind to localhost rather than all interfaces (0.0.0.0) #2513

Closed
nfelt opened this issue Aug 7, 2019 · 2 comments
Closed

Bind to localhost rather than all interfaces (0.0.0.0) #2513

nfelt opened this issue Aug 7, 2019 · 2 comments

Comments

@nfelt
Copy link
Contributor

nfelt commented Aug 7, 2019

This tracks changing the default behavior value of TensorBoard's --host flag to localhost, rather than binding to all interfaces (aka 0.0.0.0 for IPv4 or :: for IPv6).

This is a more conservative default behavior since it exposes the webserver only to the user's machine. Users who specifically want to expose TensorBoard (e.g. in a lab context to let other users access the instance) can either pass --host=<interface> explicitly to bind to the desired interface, or configure some type of proxied access (for example, ssh port forwarding like ssh -L 6006:localhost:6006 <my-tensorboard-server>).

Strictly speaking the default behavior is actually to attempt to bind to :: and enable IPv6-mapped IPv4 for the socket, so that the same socket can serve both IPv4 and IPv6 traffic, which useful in cases where a hostname for the server (including sometimes localhost itself) has both IPv4 and IPv6 addresses associated with it, since this prevents spurious connection-denied errors from having chosen the wrong protocol. See #1449 for the details.

Since the existing behavior can't be achieved by specifying either 0.0.0.0 or :: explicitly, I propose that we accept an additional special host value, --host=*, which behave as though :: was passed but attempt to make the socket dual-bind to IPv4 as well.

This change should mostly resolve the following issues:

@nfelt nfelt changed the title Change tensorboard to bind to localhost rather than all interfaces (0.0.0.0) Change tensorboard to bind to localhost rather than all interfaces (0.0.0.0) Aug 7, 2019
@nfelt nfelt changed the title Change tensorboard to bind to localhost rather than all interfaces (0.0.0.0) Bind to localhost rather than all interfaces (0.0.0.0) Aug 7, 2019
@nfelt
Copy link
Contributor Author

nfelt commented Aug 7, 2019

Duplicate of #2387

@nfelt nfelt marked this as a duplicate of #2387 Aug 7, 2019
@nfelt
Copy link
Contributor Author

nfelt commented Aug 7, 2019

Closing since I belatedly realized there is already a user issue for this.

@nfelt nfelt closed this as completed Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant