Compare commits
2 commits
4b822d94b0
...
d6333c0a57
Author | SHA1 | Date | |
---|---|---|---|
Tristan Daniël Maat | d6333c0a57 | ||
Tristan Daniël Maat | dc03395af5 |
|
@ -53,7 +53,6 @@
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "tlaternet";
|
hostName = "tlaternet";
|
||||||
usePredictableInterfaceNames = false;
|
usePredictableInterfaceNames = false;
|
||||||
useDHCP = false;
|
|
||||||
|
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{config, ...}: {
|
{config, ...}: {
|
||||||
# iptables needs to permit forwarding from wg0 to wg0
|
|
||||||
networking.firewall.extraCommands = ''
|
|
||||||
iptables -A FORWARD -i wg0 -o wg0 -j ACCEPT
|
|
||||||
'';
|
|
||||||
|
|
||||||
systemd.network = {
|
systemd.network = {
|
||||||
netdevs = {
|
netdevs = {
|
||||||
"20-wg0" = {
|
"20-wg0" = {
|
||||||
|
@ -43,27 +38,11 @@
|
||||||
"20-wg0" = {
|
"20-wg0" = {
|
||||||
matchConfig.Name = "wg0";
|
matchConfig.Name = "wg0";
|
||||||
|
|
||||||
networkConfig = {
|
networkConfig.Address = [
|
||||||
Address = [
|
"10.45.249.1/24"
|
||||||
"10.45.249.1/32"
|
|
||||||
# TODO(tlater): Add IPv6 whenever that becomes relevant
|
# TODO(tlater): Add IPv6 whenever that becomes relevant
|
||||||
];
|
];
|
||||||
|
|
||||||
IPForward = "yes";
|
|
||||||
IPv4ProxyARP = "yes";
|
|
||||||
};
|
|
||||||
|
|
||||||
routes = [
|
|
||||||
{
|
|
||||||
routeConfig = {
|
|
||||||
Source = "10.45.249.0/24";
|
|
||||||
Destination = "10.45.249.0/24";
|
|
||||||
Gateway = "10.45.249.1";
|
|
||||||
GatewayOnLink = "no";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
linkConfig.RequiredForOnline = "no";
|
linkConfig.RequiredForOnline = "no";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue