add vm working with dhcp+dns
This commit is contained in:
parent
532d76c049
commit
63688f3068
6 changed files with 77 additions and 17 deletions
|
@ -90,11 +90,11 @@ in {
|
|||
config = {
|
||||
networking = {
|
||||
domain = if machine.type == "physical" then "hyp" else "dmz";
|
||||
nftables.enable = true;
|
||||
useDHCP = machine.type == "virtual";
|
||||
nftables.enable = false;
|
||||
useDHCP = false;
|
||||
|
||||
firewall = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
checkReversePath = false;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -23,7 +23,8 @@ in
|
|||
config = lib.mkIf cfg.enable {
|
||||
lab.networking.allowDMZConnectivity = true;
|
||||
|
||||
networking.firewall.interfaces.${config.lab.networking.dmzBridgeName} = {
|
||||
# TODO: listen only on dmz interface, make this portable between physical and VM.
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 53 5353 ];
|
||||
allowedUDPPorts = [ 53 67 5353 ];
|
||||
};
|
||||
|
|
Reference in a new issue