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

31 lines
763 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
];
2022-07-15 09:39:13 +02:00
networking.firewall.interfaces.ens19.allowedUDPPorts = [ 67 53 ];
2022-07-07 11:15:52 +02:00
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;
}];
};
};
};
}