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

Incorrect public IP #1

Open
rg0now opened this issue Jun 6, 2023 · 0 comments
Open

Incorrect public IP #1

rg0now opened this issue Jun 6, 2023 · 0 comments

Comments

@rg0now
Copy link
Member

rg0now commented Jun 6, 2023

Often STUNner cannot determine the public IP for a Gateway even in completely legitimate uses. For instance, many private Kubernetes clusters lack a LoadBalancer and node ExternalIPs (kubeadm does not set the NodeExternalIP and the NodeExternaDNS on nodes unless it is explicitly instructed to do so), so STUNner will fall to pick up a public IP. In these cases the ICE server configs generated by the auth-svc will contain the placeholder $STUNNER_ADDR as the public IP, which is obviously wrong.

There are a couple of related issues at play here here:

  • the default public IP ($STUNNER_ADDR) we use as a fallback is obviously wrong,
  • if the auth-svc fails to find a public IP it should report an error instead of returning a dysfunctional TURN URI,
  • the caller should have a way to manually enforce the public IP in the TURN server URIs.

The plan is to implement the following logic in the auth-svc daemon to obtain a usable public IP:

  • if the HTTP query contains key public-ip key then use the value of that key,
  • otherwise use the public_address in the stunnerd-config config file,
  • otherwise use the STUNNER_PUBLIC_ADDR environment variable (if set),
  • if still no usable IP found then return a HTTP 404 error.

This issue tracks the progress on the development of this feature.

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