iptables: use dest_addr and dest_port for public port FORWARD rule

Docker-DCO-1.1-Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> (github: jpoimboe)
This commit is contained in:
Josh Poimboeuf 2014-02-04 07:08:31 -06:00
parent 0bcfb5a78d
commit a298bd3b63

View file

@ -82,8 +82,8 @@ func (c *Chain) Forward(action Action, ip net.IP, port int, proto, dest_addr str
"!", "-i", c.Bridge, "!", "-i", c.Bridge,
"-o", c.Bridge, "-o", c.Bridge,
"-p", proto, "-p", proto,
"-d", daddr, "-d", dest_addr,
"--dport", strconv.Itoa(port), "--dport", strconv.Itoa(dest_port),
"-j", "ACCEPT"); err != nil { "-j", "ACCEPT"); err != nil {
return err return err
} else if len(output) != 0 { } else if len(output) != 0 {