From ea63ade772445591e78b42a36fa0dcfffa4a9f1a Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Tue, 4 Feb 2014 07:08:31 -0600 Subject: [PATCH] iptables: use dest_addr and dest_port for public port FORWARD rule Docker-DCO-1.1-Signed-off-by: Josh Poimboeuf (github: jpoimboe) --- pkg/iptables/iptables.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/iptables/iptables.go b/pkg/iptables/iptables.go index 2df93657ac..4cdd67ef7c 100644 --- a/pkg/iptables/iptables.go +++ b/pkg/iptables/iptables.go @@ -82,8 +82,8 @@ func (c *Chain) Forward(action Action, ip net.IP, port int, proto, dest_addr str "!", "-i", c.Bridge, "-o", c.Bridge, "-p", proto, - "-d", daddr, - "--dport", strconv.Itoa(port), + "-d", dest_addr, + "--dport", strconv.Itoa(dest_port), "-j", "ACCEPT"); err != nil { return err } else if len(output) != 0 {