Hello,
I have a service that does the following:
- create network namespace called “connect”
- move eth1 to this namespace (to be used as LAN interface)
- creates Wireguard connection in main namespace, then moves it to “connect”. This Wireguard connection has default route via it. (to be used as WAN)
All good, but resolving in the namespace work partially. For example, nslookup google.com returns results, but curl google.com says the address can’t be resolved. ping can’t resolve as well. If I curl by IP address, for example curl 1.1.1.1. Strace shows lines likes this:
openat(AT_FDCWD, "/nix/store/vvxlkl1hjh8rc3rc6dp9p0pslsm4r9n1-libcap-2.77-lib/lib/glibc-hwcaps/x86-64-v4/libcap.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/vvxlkl1hjh8rc3rc6dp9p0pslsm4r9n1-libcap-2.77-lib/lib/glibc-hwcaps/x86-64-v4/", 0x7fff0b34b0b0, 0) = -1 ENOENT (No such file or directory)
but ldd does not show missing files.
I tried same Wireguard config on Debian instance, again in a namespace, and everything is fine.
Anyone ran into this? NixOS 26.05.
Thanks in advance.