/etc/resolv.conf keeps getting erased
Posted: Fri Mar 01, 2024 4:04 pm
Hello community,
I have EVE-NG Community installed on a laptop (bare install), and I wanted to configure one NIC for Internet access, with static settings.
My issue is that /etc/resolv.conf file keeps getting erased. As far as I can tell, I happens every time a network interface goes down or up.
When I say erased, I mean it reverts to:
nameserver 127.0.0.53
options edns0 trust-ad
Eve-ng details:
uname -a == Linux eve-ng 5.17.8-eve-ng-uksm-wg+ #1 SMP PREEMPT Mon May 16 10:08:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
dpkg -l eve-ng : version 5.0.1-19 Architecture amd64
I followed some advices from the internet and:
- auditctl -w /etc/resolv.conf -p w doesn't help. Nothing related to that file in the logs
- added
supersede domain-name "my.domain.com";
prepend domain-search "my.domain.com";
to etc/dhcp/dhclient.conf but didn't help.
- If I try to use DHCP, /var/run/NetworkManager/resolv.conf gets populated with the nameservers assigned by my home router but /etc/resolv.conf keeps getting erased
- edited /etc/NetworkManager/NetworkManager.conf and added
[main]
dns=none
didn't help at all.
- edited /etc/systemd/resolved.conf and added
[Resolve]
DNS=1.1.1.1
still nothing. resolv.conf keeps getting erased and name resolution fails
Could you please tell me how do I fix this, or if there is any workaround to this ?
I have EVE-NG Community installed on a laptop (bare install), and I wanted to configure one NIC for Internet access, with static settings.
My issue is that /etc/resolv.conf file keeps getting erased. As far as I can tell, I happens every time a network interface goes down or up.
When I say erased, I mean it reverts to:
nameserver 127.0.0.53
options edns0 trust-ad
Eve-ng details:
uname -a == Linux eve-ng 5.17.8-eve-ng-uksm-wg+ #1 SMP PREEMPT Mon May 16 10:08:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
dpkg -l eve-ng : version 5.0.1-19 Architecture amd64
I followed some advices from the internet and:
- auditctl -w /etc/resolv.conf -p w doesn't help. Nothing related to that file in the logs
- added
supersede domain-name "my.domain.com";
prepend domain-search "my.domain.com";
to etc/dhcp/dhclient.conf but didn't help.
- If I try to use DHCP, /var/run/NetworkManager/resolv.conf gets populated with the nameservers assigned by my home router but /etc/resolv.conf keeps getting erased
- edited /etc/NetworkManager/NetworkManager.conf and added
[main]
dns=none
didn't help at all.
- edited /etc/systemd/resolved.conf and added
[Resolve]
DNS=1.1.1.1
still nothing. resolv.conf keeps getting erased and name resolution fails
Could you please tell me how do I fix this, or if there is any workaround to this ?