From 594d842857032776d5d1417e5455d2dce36cadd9 Mon Sep 17 00:00:00 2001 From: clerie Date: Tue, 15 Dec 2020 18:15:50 +0100 Subject: [PATCH] Add router config --- configuration/router/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/configuration/router/default.nix b/configuration/router/default.nix index 64177f4..5ef8c8f 100644 --- a/configuration/router/default.nix +++ b/configuration/router/default.nix @@ -5,5 +5,16 @@ wireguard-tools ]; -# services.bird2.enable = true; + 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 + ''; }