Move generic config for dn42 routers to special module
This commit is contained in:
parent
dd7bdf8efa
commit
26cae76337
@ -4,4 +4,17 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wireguard-tools
|
wireguard-tools
|
||||||
];
|
];
|
||||||
|
|
||||||
|
boot.kernel.sysctl = {
|
||||||
|
"net.ipv4.ip_forward" = true;
|
||||||
|
"net.ipv6.conf.all.forwarding" = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Open Firewall for BGP
|
||||||
|
networking.firewall.allowedTCPPorts = [ 179 ];
|
||||||
|
# Open Fireall for OSPF
|
||||||
|
networking.firewall.extraCommands = ''
|
||||||
|
ip6tables -A INPUT -p ospfigp -j ACCEPT
|
||||||
|
iptables -A INPUT -p ospfigp -j ACCEPT
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
@ -14,11 +14,6 @@
|
|||||||
boot.loader.grub.version = 2;
|
boot.loader.grub.version = 2;
|
||||||
boot.loader.grub.device = "/dev/vda";
|
boot.loader.grub.device = "/dev/vda";
|
||||||
|
|
||||||
boot.kernel.sysctl = {
|
|
||||||
"net.ipv4.ip_forward" = true;
|
|
||||||
"net.ipv6.conf.all.forwarding" = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "dn42-il-gw5";
|
networking.hostName = "dn42-il-gw5";
|
||||||
|
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
@ -47,14 +42,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
|
||||||
179
|
|
||||||
];
|
|
||||||
networking.firewall.extraCommands = ''
|
|
||||||
ip6tables -A INPUT -p ospfigp -j ACCEPT
|
|
||||||
iptables -A INPUT -p ospfigp -j ACCEPT
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.bird2.enable = true;
|
services.bird2.enable = true;
|
||||||
services.bird2.config = ''
|
services.bird2.config = ''
|
||||||
router id ${ (lib.head config.networking.interfaces.ens18.ipv4.addresses).address };
|
router id ${ (lib.head config.networking.interfaces.ens18.ipv4.addresses).address };
|
||||||
|
Loading…
Reference in New Issue
Block a user