From 0f658f6facd9bf09d27d9ade3c088adf2d169c00 Mon Sep 17 00:00:00 2001 From: Devin Finlinson Date: Fri, 2 May 2025 02:50:58 -0600 Subject: haven't found a working vm config for networking yet --- machines/vm/foolcreek/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'machines/vm/foolcreek') diff --git a/machines/vm/foolcreek/default.nix b/machines/vm/foolcreek/default.nix index d0754ee..0b0fa7c 100644 --- a/machines/vm/foolcreek/default.nix +++ b/machines/vm/foolcreek/default.nix @@ -26,9 +26,18 @@ # }; # }; microvm = { + forwardPorts = [ # forward local port 2222-> 22, to ssh into the VM + { from = "host"; host.port = 2222; guest.port = 22; } + + # forward local port 80 -> 10.1.11.100:80 in the VLAN + { from = "guest"; host.port = 8080; guest.port = 80; # website + # guest.address = "10.1.11.101"; guest.port = 80; + # host.address = "127.0.0.1"; host.port = 80; + } + ]; interfaces = [{ - type = "user"; - id = "foolcreek"; + type = "tap"; + id = "vm-foolcreek"; mac = "02:00:00:00:00:01"; }]; }; @@ -38,10 +47,10 @@ networks."20-lan" = { matchConfig.Type = "ether"; networkConfig = { - Address = ["10.1.11.101"]; + Address = ["10.1.11.101/24" "2001:db8::b/64"]; Gateway = "10.1.11.254"; DNS = ["8.8.8.8"]; - # IPv6AcceptRA = true; + IPv6AcceptRA = true; DHCP = "no"; }; }; -- cgit v1.2.3