Hi all. I have the following
OS: Ubuntu 22.04.1 LTS, kernel 5.15
Docker version: 20.10.21
I create a network with
docker network create net_test
then run
*docker run -d --name srvr_tester --network=*net_test python:3.8 python -m http.server 443
then from outside I tried to run
curl -X ‘GET’ --insecure http://192.168.192.13:443/etc/resolv.conf
and it goes in timeout.
I ve been checking FW and IPTABLES but still nothing.
any clue?
Cheers
meyay
(Metin Y.)
December 14, 2022, 8:44am
2
Can you elaborate, why this should work?
Assumed 192.168.192.13 is the docker host’s ip, then the behavior is correct.
If you want a container to be reachable on a host network port, you need to publish it:
My apologies.
Here is the command that I run.
docker run -d -p 443:8000 --name srvr_tester --network=net_test python:3.8 python -m http.server 8000
/Alf
rimelek
(Ákos Takács)
December 17, 2022, 9:52pm
4
Since you shared a different command does that mean you solved the issue by publishing the port?
Hi @rimelek .
it was my mistake posting the wrng command so still not working.
{
“bip”: “[10.9.8.1/24]”,
“fixed-cidr”: “[10.9.8.0/25]”,
“fixed-cidr-v6”: “2001:db8::/64”,
“default-address-pools”:[{“base”:“[10.0.0.0/24]”, “size”:28}],
“mtu”: 1500,
“dns”: [“10.26.16.16”,“10.26.16.18”],
“dns-search”: [“mycompany.com ”]
}
It looks like the request arrive at the eth0 device but it’s not passed on neither to the docker bridge or veth interface.
Some setting on the kernel that I am missing
Cheers
rimelek
(Ákos Takács)
December 20, 2022, 10:03am
6
If
you are using the right port number (the port on the left side in the docker command)
and there is no firewall blocking the request
and you have the same port in the docker command on the left side as the application is listening on inside
your request should work.
How and what did you check exactly?
Do you have any firewall in front of the destinations server?
Can you successfully run the curl comand on the server using the same IP that you want to access remotely?
Have you tried to disable ufw on the server just for testing (if it is not a public, production server)sudo ufw disable