I have a docker container with IP 172.17.0.3 running on a host with the docker interface docker0 172.17.0.1 and the eth0 interface 192.168.1.2.
How can I send packets to the host's specific port from within the container?
From the Ip 172.17.0.3 i want to send TCP traffic to port 10000 of th host with IP 192.168.1.2. When the host receivs the packets on 10000 they will then be forwarded over SSH (which I have covered already) via
ssh -NL 10000:ip:10000 username@host -v.
I assume it's not possible to send them directly from within the container over the SSH from the host, tha's why I'd only need a solution for transfering the packets from within the container 172.17.0.3:20000 to the host 192.168.1.2:10000.