!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

916 Members
Declaratively manage your switching, routing, wireless, tunneling and more.275 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
6 Sep 2025
@kraem:ne.bul.aekraem* i've created a systemd service which joins a network namespace, but i can't get it to use a specific dns server instead of the hosts. i've tried BindReadOnlyPaths but i can't get it to work. did anyone here successfully do this? here's what i have so far: https://paste.rs/FWI2h.txt (i've verified the service joins the netns and it uses it successfully)17:38:20
@jassu:kumma.juttu.asiaJassukoIs the resolv_conf destination thing wrong? or how does that work?22:13:25
@kraem:ne.bul.aekraem i just found out how to verify that it actually is mounted correctly:
  1. systemd-cgls --unit wg-netns-test0 (lists pids running in the container)

  2. nsenter -a -t $pid

  3. cat /etc/resolv.conf (inside the nsenter) gives me the correct contents (which is different than my hosts)


so for some reason the processes inside the service isn't using the nameserver resolv.conf specified in the resolv.conf ..
23:00:27
@kraem:ne.bul.aekraemdo i need to run a separate resolver inside the service somehow, may23:01:57
@kraem:ne.bul.aekraem* do i need to run a separate resolver inside the service somehow? maybe the processes are calling into my hosts networkmanager resolver which is running with the hosts resolv.conf configuration?23:03:27

Show newer messages


Back to Room ListRoom Version: 6