host reserved an port range (in sysctl.conf) <net.ipv4.ip_local_port_range = 1024 49999> ssh-r mapping the start 2000 port (50000 - 51999)
Signed-off-by: Tong Qunfeng taxcom@tom.com --- container/ssh-r/Dockerfile | 2 +- container/ssh-r/start | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/container/ssh-r/Dockerfile b/container/ssh-r/Dockerfile index 1c10e03..65a13aa 100644 --- a/container/ssh-r/Dockerfile +++ b/container/ssh-r/Dockerfile @@ -21,7 +21,7 @@ RUN chown -R sshr:sshr /home/sshr/.ssh/authorized_keys \ && chmod 600 /home/sshr/.ssh/authorized_keys \ && passwd -u sshr
-EXPOSE 20000-22000 +EXPOSE 50000-51999 EXPOSE 22
COPY entry.sh /entry.sh diff --git a/container/ssh-r/start b/container/ssh-r/start index e962656..5c800f3 100755 --- a/container/ssh-r/start +++ b/container/ssh-r/start @@ -15,7 +15,7 @@ cmd=( -e GATEWAY_PORTS=true -e TCP_FORWARDING=true -d - -p 20000-22000:20000-22000 + -p 50000-51999:50000-51999 -p 5050:22 -v /etc/localtime:/etc/localtime:ro -v /srv/pub/sshr/keys/:/etc/ssh/keys