mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #6371 from jpetazzo/6370-masquerade
Select masquerade by outgoing interface rather than by destination subne...
This commit is contained in:
commit
bcec0f30e8
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ func InitDriver(job *engine.Job) engine.Status {
|
|||
|
||||
func setupIPTables(addr net.Addr, icc bool) error {
|
||||
// Enable NAT
|
||||
natArgs := []string{"POSTROUTING", "-t", "nat", "-s", addr.String(), "!", "-d", addr.String(), "-j", "MASQUERADE"}
|
||||
natArgs := []string{"POSTROUTING", "-t", "nat", "-s", addr.String(), "!", "-o", bridgeIface, "-j", "MASQUERADE"}
|
||||
|
||||
if !iptables.Exists(natArgs...) {
|
||||
if output, err := iptables.Raw(append([]string{"-I"}, natArgs...)...); err != nil {
|
||||
|
|
Loading…
Reference in a new issue