From 14eb0f3bbaa752021eb35ce8a9aaab68692084ac Mon Sep 17 00:00:00 2001 From: Chin Godawita Date: Tue, 8 Jan 2019 12:22:10 +0000 Subject: [PATCH] Fixed issue with moby block IP forwarding and hence our container routing. Relevant issues: * moby/moby#28257 * boot2docker/boot2docker#1364 --- cli/dinghy/dnsdock.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cli/dinghy/dnsdock.rb b/cli/dinghy/dnsdock.rb index 215b8ec..13199c6 100644 --- a/cli/dinghy/dnsdock.rb +++ b/cli/dinghy/dnsdock.rb @@ -36,6 +36,7 @@ def up unless resolver_configured? configure_resolver! end + fix_moby_iptables! route_add! end @@ -87,6 +88,12 @@ def route_add! flush_dns_cache! end + # Moby has changed how they accept IP forwarding. + # @see https://github.com/boot2docker/boot2docker/issues/1364 + def fix_moby_iptables! + machine.ssh("sudo /usr/local/sbin/iptables -P FORWARD ACCEPT") + end + def route_remove! System.capture_output do system!("removing route", "sudo", "route", "-n", "delete", DOCKER_SUBNET)