{config, lib, pkgs, ...}: { boot.kernel.sysctl."net.ipv4.ip_forward" = true; networking.nat = { enable = true; internalInterfaces = [ "enp2s0" ]; externalInterface = "enp1s0"; }; networking.interfaces.enp2s0 = { useDHCP = false; ipv4.addresses = [{ address = "192.168.42.1"; prefixLength = 24; }]; }; services.dnsmasq = { enable = true; settings = { interface = [ "enp2s0" ]; bind-dynamic = true; dhcp-option = "3,0.0.0.0"; dhcp-range = "192.168.42.100,192.168.42.254,255.255.255.0,12h"; }; }; }