Quantcast
Channel: Active questions tagged networking - Ask Ubuntu
Viewing all articles
Browse latest Browse all 23119

Not able to request docker container using eth1 interface IP

$
0
0

I have a vps on ec2 instance, It has eth0 interface by default and I have set up the eth1 interface on it by editing the yaml file and doing netplan apply, so the ip rule and ip route were added. I could ping and curl on both interfaces.

The problem arise when I have a docker container to run. I have 2 container block in the docker-compose.yaml file, in containerA, I have mapped the eth0 interface internal IP 172.31.33.191 on 80 port to the containerA port 4000. Similarly in containerB , I have mapped the eth1 interface internal IP 172.31.40.172 on 80 port to the containerB port 3000.

Now, when I ping using eth0 Internal IP on port 80, the request pass through and I get the result back. But when I ping using eth1 Internal IP on port 80, it is not able to make the connection at all.

What could be the issue here ?

1e793b073856 ubuntu-backend "docker-entrypoint.s…" 10 hours ago Up 10 hours 172.31.40.172:80->3000/tcp

This above doesn't work

05db9c4d7fca ubuntu-backend2 "/codebase/app/ -p /a…" 10 hours ago Up 10 hours 172.31.33.191:80->4000/tcp

This works


Viewing all articles
Browse latest Browse all 23119

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>