32 lines
823 B
Nix
32 lines
823 B
Nix
{ config, pkgs, ...}:
|
|
|
|
{
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
ethtool # manage NIC settings (offload, NIC feeatures, ...)
|
|
conntrack-tools # view network connection states
|
|
];
|
|
|
|
networking.firewall.interfaces.ens19.allowedUDPPorts = [ 67 53 ];
|
|
networking = {
|
|
nameservers = [ "10.42.10.8" "2a01:4f8:1c0c:8221::8" ];
|
|
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; }
|
|
{ address = "10.42.10.25"; prefixLength = 24; }
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|