nix-community / nixos-images

Automatically build (netboot) images for NixOS [maintainer=@Mic92]
MIT License
177 stars 33 forks source link

When NixOS boots, the default gateway route is missing #242

Open slashfast opened 2 months ago

slashfast commented 2 months ago

My VPS provider's default gateway is on a different subnet and is resolved locally (onlink). I don't know much about computer networks and spent a day trying to solve the problem and today I tried to add this route:

ip route add default via 10.0.0.1 dev ens3 onlink

After that the VPS was able to accept connections. It seems like your script should save all network settings, but in this case the route is not saved and after kexec the server is no longer available on the Internet.

Mic92 commented 1 month ago

From your now installed machine can you run the following commands?

ip --json addr > addrs.json
ip -4 --json route > routes-v4.json
ip -6 --json route > routes-v6.json

And share the resulting files?

slashfast commented 1 month ago

No problem @Mic92

addrs.json routes-v4.json routes-v6.json

From your now installed machine can you run the following commands?

ip --json addr > addrs.json
ip -4 --json route > routes-v4.json
ip -6 --json route > routes-v6.json

And share the resulting files?