Answer the question
In order to leave comments, you need to log in
Why don't Docker containers send traffic to a port?
The situation is as follows:
it became necessary to access an external service through socks5 (license binding)
, it was decided to create a separate container with shared socks:
in the socks5 docker image
FROM debian:jessie
ADD ssh/ /root/.ssh # added keys
CMD ["ssh", "-C2qTnN", "-D", "1080", "[email protected]_ip"]
EXPOSE 1080
curl --socks5 127.0.0.1:1080 url
curl --socks5 socks5:1080 url
, I get Answer the question
In order to leave comments, you need to log in
Try adding the -g ( tyts ) option, by default ssh binds ports only on the loopback interface and they are not available to other containers. Well, check that the ssh key is without a password and the host is present in known_hosts. This is how it worked for me:
CMD ["ssh", "-C2qTnNg", "-o", "StrictHostKeyChecking no", "-D", "1080", "[email protected]"]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question