bagel-container: provide IPv4 NAT for outbound access
This commit is contained in:
parent
7d9d2a93df
commit
a1c645a1e6
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
Bridge = "wan-br";
|
Bridge = "wan-br";
|
||||||
|
VirtualEthernetExtra = "vb-bagel-v4:host1";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23,4 +24,10 @@
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
overrideStrategy = "asDropin";
|
overrideStrategy = "asDropin";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.network.networks."20-vb-bagel-v4" = {
|
||||||
|
matchConfig.Name = "vb-bagel-v4";
|
||||||
|
networkConfig.Address = [ "172.16.100.1/24" ];
|
||||||
|
networkConfig.IPMasquerade = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
'')
|
'')
|
||||||
config.networking.newtype.hosts);
|
config.networking.newtype.hosts);
|
||||||
|
|
||||||
# leave container interfaces alone
|
# leave container interfaces alone unless otherwise specified
|
||||||
systemd.network.networks."05-veth".extraConfig = ''
|
systemd.network.networks."95-veth".extraConfig = ''
|
||||||
[Match]
|
[Match]
|
||||||
Driver = veth
|
Driver = veth
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue