https://netmaker.org logo
Title
b

boundless-dress-82055

06/23/2022, 7:05 AM
hello! I'm running netclient on a machine that doesn't allow editing of
/etc/hosts
(running NixOS). Two questions - is there and option to tell netclient not to try to edit it? - while running the daemon hostnames are not resolved. Is that supposed to happen anyway via CoreDNS? If so, can you suggest some troubleshooting pointers?
b

bored-island-21407

06/23/2022, 10:59 AM
turn dns off for the node (in netmaker UI)
b

boundless-dress-82055

06/23/2022, 2:22 PM
that indeed doesn't try to write to hosts anymore, and I get > [netclient] 2022-06-23 16:21:23 settng DNS off
but I don't seem to resolve internal hostnames
b

bored-island-21407

06/23/2022, 2:23 PM
not sure I understand your last comment
b

boundless-dress-82055

06/23/2022, 2:26 PM
if I
ssh something.<base domain>
, I get
could not resolve
...
b

bored-island-21407

06/23/2022, 2:27 PM
without dns on (and updating /etc/hosts), private dns for netmaker nodes is not supported
b

boundless-dress-82055

06/23/2022, 2:28 PM
ok. so what is CoreDNS? :/
I thought it was the previous way to handle dns, so it might still be enough
b

bored-island-21407

06/23/2022, 2:29 PM
it's use has been deprecated ... still there because would like to use it in the future but getting it to work with all linux distros is extremely difficult
b

boundless-dress-82055

06/23/2022, 2:31 PM
ok so no luck 🙂 I wonder it it would be possible to write to a different file/ Then maybe it could be used somehow, at user's discretion?
b

bored-island-21407

06/23/2022, 2:34 PM
If you set environment.etc.hosts.mode = "0644";, you can modify the file as root. Note that changes made in this way will be discarded when switching configurations. I used this to make vagrant’s hostmanager work though, and it worked pretty smoothly.
b

boundless-dress-82055

06/23/2022, 3:09 PM
I see, thanks. But ideally I think the second solution there seems better 🙂