Networking: Difference between revisions

m Configuration: link to related pages
Yuannan (talk | contribs)
Added help for VMs not having network access.
Line 115: Line 115:
         }
         }
     '';
     '';
  };
};
</syntaxhighlight>
== Virtualization ==
Sometimes with complex network configurations such as with VPNs or firewall rules you may need extra configurations in order for your VMs to have network access.
<syntaxhighlight lang="nix">
networking = {
  firewall = {
    enable = true;
   
    trustedInterfaces = [
      "virbr0"
    ];
  };
  nat = {
    enable = true;
    internalInterfaces = [
      "virbr0"
    ];
   };
   };
};
};