netclient icon indicating copy to clipboard operation
netclient copied to clipboard

Modifying /etc/hosts causing issues

Open purepani opened this issue 2 years ago • 7 comments

I am a NixOS user, and one of the changes NixOS makes is that /etc/hosts is symlinked from the nix store, which is read only. The issue this causes is when using the DNS integration, since /etc/hosts can't be modified, nothing is populated into there.

I was also thinking this might cause other conflicts with other programs that might also try to modify /etc/hosts. Is there a way to work around this, or would that require integrating a different solution for dns resolution into netclient?

purepani avatar Oct 13 '23 16:10 purepani

there is no workaround

mattkasun avatar Oct 16 '23 17:10 mattkasun

Thanks, I'll try and look harder for a solution on the Nixos side

purepani avatar Oct 16 '23 18:10 purepani

@purepani I don't think there is solution on Nixos side. The security/file model doesn't allow write access to host file. @mattkasun Are there any plans to integrate DNS management system instead of modifying /etc/hosts ?

wexder avatar Nov 27 '23 08:11 wexder

No plans that I am aware of

mattkasun avatar Nov 27 '23 12:11 mattkasun

@mattkasun so there's no chance of running netclient with dns integration on distributions like Nixos ?

wexder avatar Dec 09 '23 18:12 wexder

Not with current implementation

mattkasun avatar Dec 09 '23 20:12 mattkasun

One could still run a little DNS server, inside a VM, or even next to NM, that responds for whatever you want :-) It would involve adding every host to this DNS, then pointing your clients to this DNS.

Dnsmasq is quite simple, and yet very powerfull :-)

Regards,

gigadjo avatar Jan 05 '24 17:01 gigadjo

@purepani we have deprecated modifying /etc/hosts, rather you use the coredns container running along with other netmaker stack for DNS resolution on netmaker host entries https://docs.netmaker.io/architecture.html#coredns

abhishek9686 avatar Jun 04 '24 12:06 abhishek9686