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

Please expose more/all ports #2

Closed
frankhommers opened this issue Dec 3, 2018 · 7 comments
Closed

Please expose more/all ports #2

frankhommers opened this issue Dec 3, 2018 · 7 comments

Comments

@frankhommers
Copy link

Can you expose the ports 1001-65500 in your container?

This because I wanted to publish ports 33000 until 33100 for my container (ports in the range of 10000-10100) are used elsewhere. So I passed this to the container: -p 33300-33400:10000-10100

This works, but it gets very confusing:
I would start with this.

ssh -fN -R 10000:localhost:22 -p 2222 root@domain.tld

But I need to connect with this:
ssh -p 33300 user@localhost

That's really confusing. And exposing all the ports and just specify a few of them using -p will solve this problem.

@frankhommers frankhommers changed the title Please expose more. Please expose more/all ports Dec 3, 2018
@efrecon
Copy link
Owner

efrecon commented Dec 3, 2018

I understand, but opening "all" ports (or more) will take a long time, so the range is some sort of a compromise between having enough ports and letting the container start within some sort of reasonable time frame. I don't really know what the best behaviour is here and you have a solution at hand (even though I admit it is a bit confusing...).

Extra thoughts?

@frankhommers
Copy link
Author

Yeah. I could work with --net=host and move the sshd to another port. I'll check that.

@frankhommers
Copy link
Author

I tried to run my docker with
docker run -it --rm --net=host --name rsshd -e PASSWORD=secret -v /data/rsshd/keys:/etc/ssh/keys -v /data/clients:/root/.ssh efrecon/rsshd -d -d -d -p 22222

but the -d -d -d and also the -p 22222 do not seem to reach the sshd arguments.

@frankhommers frankhommers reopened this Dec 3, 2018
@efrecon
Copy link
Owner

efrecon commented Dec 3, 2018

hm.. Will have to look into this in more details then. You are welcome to debug if you want, arguments from the command should be passed to sshd as the last line of the entrypoint called sshd.sh.

@frankhommers
Copy link
Author

Yeah I have seen that. Just a simple echo "$@" at the beginning of the sshd.sh will not show anything. I wonder if there is anything wrong with my installation.

@frankhommers
Copy link
Author

The arguments don't work on my Synology as well as my MacBook. I'll just build my own docker to my specific needs.

@frankhommers
Copy link
Author

BTW: Exposing all ports (1-65535) works just fine and fast. As long as you don't -p them all, there is nothing wrong with this.

BTW2: ENV ARGS also works nice for me.

I can put it in a PR if you like. But I can also just fork it and roll my own ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants