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 specific ip address #1193

Closed
m4r10k opened this issue Feb 25, 2017 · 9 comments
Closed

Bind to specific ip address #1193

m4r10k opened this issue Feb 25, 2017 · 9 comments

Comments

@m4r10k
Copy link

m4r10k commented Feb 25, 2017

What version of Traefik are you using (traefik version)?

1.1.2

I would like to bind an instance of traefik to a given ip address and not to all. I've looked in the documention but I did not see a configuration option for this. Furthermore I did not see an command line switch for that. It would be nice to run multiple instances of traefik on different network interfaces at the same time. Like ist is possible in nginx or httpd through the "listen" parameter like "listen a.b.c.d:1234". Please excuse me, if I've overlook it anywhere.

Thank you!

@m4r10k m4r10k changed the title Bind to ip address Bind to specific ip address Feb 25, 2017
@timoreimann
Copy link
Contributor

You should be able to provide an IP address before the :<port> specification in the entry points.

@m4r10k
Copy link
Author

m4r10k commented Feb 25, 2017

Oh... I did not try it because it is not documented ... I will test it and I will give feedback here.

@m4r10k
Copy link
Author

m4r10k commented Feb 25, 2017

Oh, yes indeed that works as expected 👍 - Sorry that I opened up this, maybe I line in the documentation would be helpful for others.

@m4r10k m4r10k closed this as completed Feb 25, 2017
@timoreimann
Copy link
Contributor

I think the syntax is fairly obvious to Go programmers, but that doesn't help end users like yours. :-)

I think you're right, we should improve the docs here. I'll try to file a PR over the weekend.

@benbucksch
Copy link

benbucksch commented Jul 3, 2019

we should improve the docs here

@timoreimann : That would be helpful. Over 2 years later, it's still not documented.

I'm trying to bind to 2 IP addresses, and I don't see how to do that. Could you please add this to the examples for entryPoint.http, with concrete examples (not placeholders, so that we can see the exact syntax, including :: for IPv6) for multiple IPv4 and IPv6 addresses for HTTP/HTTPS?

@timoreimann
Copy link
Contributor

@benbucksch I added a piece of TOML example configuration on the same day as I made that comment. See the reference to PR 1194 above.

That was 2 years ago, I believe a lot of refactorings have happened since then. I couldn't immediately tell where the samples are these days.

Feel free to file a new issue and / or reach out to the community on Slack and the community forum for help; especially with regards to binding to multiple addresses / protocols which this issue did not address originally.

Thanks.

@benbucksch
Copy link

benbucksch commented Jul 3, 2019

I couldn't immediately tell where the samples are these days.

https://docs.traefik.io/configuration/entrypoints/

@timoreimann
Copy link
Contributor

timoreimann commented Jul 3, 2019

@benbucksch sorry, I meant the explicit samples TOML file we used to maintain. I see it's still around, but the 1.7 branch version does not seem to contain my extension anymore. It's either gone someplace else or was missed when we put more focused on the rendered documentation.

Either way, it looks like a new issue should be raised.

@benbucksch
Copy link

benbucksch commented Jul 3, 2019

@timoreimann : I've filed #5059, with the solution.

@ALL: The solution isn't in traefik.toml entryPoints sections at all, but in the docker start script / docker-compose file that starts traefik. Might seem obvious, but only if you know it :-) .

@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants