Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.

Commit

Permalink
Fixed issue with moby block IP forwarding and hence our container rou…
Browse files Browse the repository at this point in the history
…ting.

Relevant issues:
* moby/moby#28257
* boot2docker/boot2docker#1364
  • Loading branch information
chinthakagodawita committed Jan 8, 2019
1 parent 1d4c0d3 commit 14eb0f3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cli/dinghy/dnsdock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def up
unless resolver_configured?
configure_resolver!
end
fix_moby_iptables!
route_add!
end

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 14eb0f3

Please sign in to comment.