nixos/modules/cascade-router.nix

33 lines
704 B
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
{
config = {
2024-07-25 17:33:44 +00:00
#system.activationScripts."arpFilter" = ''
#PATH=${pkgs.procps}/bin:${pkgs.iptables}/bin:$PATH
# sysctl net.ipv4.conf.all.arp_filter=1
# sysctl net.ipv4.conf.default.arp_filter=1
#'';
2024-07-25 17:33:44 +00:00
environment.systemPackages = with pkgs; [
tcpdump
];
2024-07-25 17:33:44 +00:00
networking = {
nat = {
enable = true;
externalInterface = "wan0";
internalInterfaces = [ "lan0" "sec0" ];
};
useHostResolvConf = false;
useNetworkd = true;
useDHCP = false;
interfaces."wan0" = {
useDHCP = true;
#macAddress = "a0:ce:c8:c6:d2:5f";
};
};
2024-07-25 17:33:44 +00:00
system.stateVersion = "24.05";
};
}