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,
"-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 {