Do I need a default route out of my containers?
Closed this issue · 3 comments
I can ping 172.17.0.1 (the default gw that my containers are set to) from my host.
I can't ping any of the other containers, can't seem to get a http connection either (perhaps ping will never work)..
Idk what this default gateway is.. its related to default0 on linux, but I understand OSX it works in a different manner.
So, do I need to go into my other containers and replace the default route with 10.75.0.2?
Thanks for the help!
You need to route all traffic to docker's IP addresses through the tuntap interface like this:
sudo route add -net 172.16.0.0 -netmask 255.240.0.0 10.0.75.2
Needs to be done after every host restart obviously.
For some reason I occasionally need to remove the routing and add it back again if I can't connect to the containers anymore.
sudo route delete -net 172.16.0.0 -netmask 255.240.0.0 10.0.75.2
sudo route add -net 172.16.0.0 -netmask 255.240.0.0 10.0.75.2
Hope that helps :)
@nifr thanks for the help
@blairexico no you do not need a default route out
of your containers. They should already be setup to communicate out over the host. The fundamental issue is that on macOS docker doesn't support communicating in
out of the box which is what theses scripts are designed to help setup.
Have you read the README file of the project? there is a pretty good explanation there of what the scripts do and what additional steps you need to take. Let me know if you find the README insufficient and what doesn't make sense.
@blairexico has your problem been resolve?
I would like to clean up the issues list.
If I dont get a response by next week, I will close this issue.