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

Request: Port ranges for entrypoints #1677

Closed
Kenji-K opened this issue May 26, 2017 · 11 comments
Closed

Request: Port ranges for entrypoints #1677

Kenji-K opened this issue May 26, 2017 · 11 comments

Comments

@Kenji-K
Copy link

Kenji-K commented May 26, 2017

Here to make a request, hopefully it isn't to complicated.

I have to expose about 150 ports for a single application (traccar). The issue is, there is apparently no syntax for port ranges, so I would have to list each entrypoint individually

[entryPoints]
  [entryPoints.port1]
  address = ":5000"
  [entryPoints.port2]
  address = ":5001"
  [entryPoints.port3]
  address = ":5002"
  ...
  [entryPoints.port150]
  address = ":5150"

And from there even reference every entryPoint in the frontends. Could there instead be a way to specify a port range like so?

[entryPoints]
  [entryPoints.portRange1]
  address = ":5000-5150"
@Kenji-K
Copy link
Author

Kenji-K commented Jun 1, 2017

Say! Don't mean to put pressure on anyone, but could anyone evaluate how viable this is? It's not urgent by any means but it would be extremely helpful. Thanks!

@timoreimann
Copy link
Contributor

calling out @emilevauge for some initial plausibility review. :)

@emilevauge
Copy link
Member

@Kenji-K not sure to understand what you want to achieve here. Traefik will listen on 150 ports, then what?

@Kenji-K
Copy link
Author

Kenji-K commented Jun 2, 2017

@emilevauge Not sure I follow. I need to direct traffic from 150 ports to a single application in a docker swarm. I've been looking for a friendly syntax to do so but haven't been able to find an answer either on Slack or Stack Overflow.

@emilevauge
Copy link
Member

@Kenji-K do your container exposes 150 ports? Do you want to bind these 150 ports to Traefik?

@Kenji-K
Copy link
Author

Kenji-K commented Jun 2, 2017

@emilevauge Pretty much. Traccar exposes 150 ports and I am deploying it in docker swarm, together with other apps, so I want to route traffic in this swarm using traefik.

@ldez ldez added kind/enhancement a new or improved feature. priority/P3 maybe and removed status/0-needs-triage labels Jun 14, 2017
@dtomcej
Copy link
Contributor

dtomcej commented May 29, 2018

Hello @Kenji-K,

Is this still an issue?

Since Sprig templating has been added in (#1891) and (#2307), you should be able to configure all of these in a friendly template loop.

Please let us know if this issue can be closed.

Thanks!

@Kenji-K
Copy link
Author

Kenji-K commented May 29, 2018

I'll check this sometime this week. Thanks.

@ovizii
Copy link

ovizii commented Aug 21, 2018

I'm also fooling around with traccar and have the same requirement. If traefik cannot define a port range then I need to modify the traccar docker image to include SSL termination.

@ovizii
Copy link

ovizii commented Sep 6, 2018

Just to expand on the port range need for traccar, this is a snippet of how I start a traccar image:

docker run -d --restart unless-stopped --name traccar \ --hostname traccar \ --expose 8082 \ -p 5000-5150:5000-5150 \ -p 5000-5150:5000-5150/udp \ --label traefik.port=8082 \ --label traefik.frontend.rule=Host:tracking.mydomain.tld \ --label traefik.backend=tracking \ --label traefik.enable=true \ traccar/traccar:latest

traefik then knows to forward https://tracking.mydomain.tld to port 8082 but the traccar clients still communicate via HTTP only with the traccar server via Ports 5000-5150 tcp/udp

I hope this explains what exactly the original poster and myself are trying to solve.

@traefiker
Copy link
Contributor

Hi! I'm Træfiker 🤖 the bot in charge of tidying up the issues.

I have to close this one because of its lack of activity 😞

Feel free to re-open it or join our Slack workspace for more community #support.

@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

7 participants