1
0
vcp-bula-nixfiles/hosts/pre-router/router.nix

31 lines
761 B
Nix
Raw Normal View History

2022-07-07 11:15:52 +02:00
{ config, pkgs, ...}:
{
environment.systemPackages = with pkgs; [
ethtool # manage NIC settings (offload, NIC feeatures, ...)
conntrack-tools # view network connection states
];
networking.firewall.interfaces.lan.allowedUDPPorts = [ 67 53 ];
networking = {
nameservers = [ "141.24.40.3" "141.24.40.4" ];
nat = {
enable = true;
extraCommands = "iptables -A INPUT -p icmp -j ACCEPT";
externalInterface = "ens18";
internalInterfaces = [ "ens19" ];
};
interfaces = {
ens19.useDHCP = false;
ens18.useDHCP = true;
# Handle the VLANs
ens19 = {
ipv4.addresses = [{
address = "10.42.10.1";
prefixLength = 24;
}];
};
};
};
}