feat(sj-srv1): switch to hostBridge set up
the hostside veth interfaces seem to be buggy and this is more efficient anyway.
This commit is contained in:
parent
e1d4a1019a
commit
84b473d38c
4 changed files with 34 additions and 11 deletions
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
specialArgs,
|
specialArgs,
|
||||||
|
hostBridge,
|
||||||
hostAddress,
|
hostAddress,
|
||||||
localAddress,
|
localAddress,
|
||||||
imapsPort ? 993,
|
imapsPort ? 993,
|
||||||
|
@ -227,5 +228,5 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
inherit hostAddress localAddress;
|
inherit hostBridge hostAddress localAddress;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
specialArgs,
|
specialArgs,
|
||||||
|
hostBridge,
|
||||||
hostAddress,
|
hostAddress,
|
||||||
localAddress,
|
localAddress,
|
||||||
syncthingPort ? 22000,
|
syncthingPort ? 22000,
|
||||||
|
@ -56,5 +57,5 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
inherit hostAddress localAddress;
|
inherit hostBridge hostAddress localAddress;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
specialArgs,
|
specialArgs,
|
||||||
|
hostBridge,
|
||||||
hostAddress,
|
hostAddress,
|
||||||
localAddress,
|
localAddress,
|
||||||
httpPort,
|
httpPort,
|
||||||
|
@ -330,5 +331,5 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
inherit hostAddress localAddress;
|
inherit hostBridge hostAddress localAddress;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,26 @@
|
||||||
|
|
||||||
networking.nat = {
|
networking.nat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
internalInterfaces = ["ve-*"];
|
|
||||||
externalInterface = "eth0";
|
externalInterface = "eth0";
|
||||||
|
internalInterfaces = ["br0"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.bridges = {
|
||||||
|
br0 = {
|
||||||
|
interfaces = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
networking.interfaces = {
|
||||||
|
br0 = {
|
||||||
|
ipv4.addresses = [
|
||||||
|
{
|
||||||
|
address = "192.168.101.1";
|
||||||
|
prefixLength = 24;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
"net.ipv4.ip_forward" = 1;
|
"net.ipv4.ip_forward" = 1;
|
||||||
};
|
};
|
||||||
|
@ -84,14 +101,15 @@
|
||||||
|
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
hostAddress = "192.168.100.10";
|
hostBridge = "br0";
|
||||||
localAddress = "192.168.100.11";
|
hostAddress = "192.168.101.1";
|
||||||
|
localAddress = "192.168.101.10/24";
|
||||||
|
|
||||||
imapsPort = 993;
|
imapsPort = 993;
|
||||||
sievePort = 4190;
|
sievePort = 4190;
|
||||||
};
|
};
|
||||||
|
|
||||||
websrv0 =
|
webserver =
|
||||||
import ../../containers/webserver.nix
|
import ../../containers/webserver.nix
|
||||||
{
|
{
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
|
@ -100,8 +118,9 @@
|
||||||
|
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
hostAddress = "192.168.100.12";
|
hostBridge = "br0";
|
||||||
localAddress = "192.168.100.13";
|
hostAddress = "192.168.101.1";
|
||||||
|
localAddress = "192.168.101.11/24";
|
||||||
|
|
||||||
httpPort = 80;
|
httpPort = 80;
|
||||||
httpsPort = 443;
|
httpsPort = 443;
|
||||||
|
@ -114,8 +133,9 @@
|
||||||
};
|
};
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
hostAddress = "192.168.100.14";
|
hostBridge = "br0";
|
||||||
localAddress = "192.168.100.15";
|
hostAddress = "192.168.101.1";
|
||||||
|
localAddress = "192.168.101.12/24";
|
||||||
|
|
||||||
syncthingPort = 22000;
|
syncthingPort = 22000;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue