/etc/resolv.conf needs to be deleted almost every boot

This involves a newly built Gecko Leap Cinnamon system. I have built a system, seen the bug, wiped the drive, reinstalled, and seen the bug again, so it’s not my imagination.

Almost every boot, I must delete /etc/resolv.conf and reboot to regain Internet connectivity, whether wireless or Ethernet. I don’t think this is solely a Gecko bug. Deleting the file is a simple fix, but it’s annoying. Is fixing this bug on openSUSE’s schedule?

It should not be happening that often, unless your router is giving out poor information or is failing to always provide DNS server information.

Try (as root) if

netconfig -f update

is a shorter way to get things going (it will still be annoying though).

I do not see this forum swamped with the same requests for help, thus it seems to be something special at your place.
And, as long as nobody files a bug report, the bug will not be on anyone’s schedule.

But when you go and file a bug report, I assume more information should go with it then you have posted here. Like

  • using wicked or NetworkManager;
  • using DHCP or not;
  • posting what the contents of /etc/resolv.conf is when it is broken;
  • same after it is repaired;
  • more that comes to your mind as “could be of ineterest”.

You could also first post that information here and see if someone can help.

First I will add that it happens every boot, not almost every boot. And I have other Linux systems built on SSDs – I’ve got three in all, Gecko Leap Cinnamon, Linux Mint Cinnamon 18.3, and Sparky Linux LXDE – with neither of the other two complaining. Also, I have Windows 10 installed on an SSD connected via internal SATA and it does not complain.

I executed “netconfig -f update” and I will see how the next few boots go.

I’m running in a library in the US, with DHCP being present.

I don’t know what wicked is, so I must be using NetworkManager.

You will see below that I’m using ProtonVPN, but the loss of connectivity occurs before I can connect to it, in other words, connectivity is not present when I login.

I will post the contents of /etc/resolv.conf if netconfig does not solve the problem. The netconfig command saved the previous /etc/resolv.conf, with it being:

ProtonVPN DNS - protonvpn-cli

nameserver 10.8.8.1

Right now /etc/resolv.conf is:

/etc/resolv.conf file autogenerated by netconfig!

Before you change this file manually, consider to define the

static DNS configuration using the following variables in the

/etc/sysconfig/network/config file:

NETCONFIG_DNS_STATIC_SEARCHLIST

NETCONFIG_DNS_STATIC_SERVERS

NETCONFIG_DNS_FORWARDER

or disable DNS configuration updates via netconfig by setting:

NETCONFIG_DNS_POLICY=’’

See also the netconfig(8) manual page and other documentation.

Note: Manual change of this file disables netconfig too, but

may get lost when this file contains comments or empty lines

only, the netconfig settings are same with settings in this

file and in case of a “netconfig update -f” call.

Please remove (at least) this line when you modify the file!

nameserver 192.168.115.253

Please first, to make your posts better readable:

There is an important, but not easy to find feature on the forums.

Please in the future use CODE tags around copied/pasted computer text in a post. It is the # button in the tool bar of the post editor. When applicable copy/paste complete, that is including the prompt, the command, the output and the next prompt.

But we will try to interprete what you posted already.

And please, let us be very precise.

Did “netconfig -f update” instead of “rm /etc/resolv.conf and reboot” help or not?
In other words, after boot with a not working DNS and you did “netconfig -f update”, did that help (without reboot)?

Saying that DHCP is present in your LAN, is fine, but does not tell if your system uses it or not. And the last thing is what I asked for.

When you do not know if wicked or NM is used, probably somebody else installed (and managed) the system. Neevertheless you can find out.
YaST > System > Network Settings. Click the General options tab. At top left you see either Wicked-service or NetworkManager-service. Please report.

You show /etc/resolv.conf “as it is Right now”. I asked for the not working and the working situation. Was “Right now” the working situation or not and where is the other one?

It is typical of VPN software, to modify “resolv.conf” when you connect to the VPN. This is so you will use DNS appropriate for the VPN.

It is also typical for VPN software to undo those modifications when you shutdown the VPN.

It looks as if your VPN software might be failing to undo the changes, and that could be causing the problem that you are seeing.

Sorry for my not knowing the rules. I can see how my quoted text was not so clear.

As for “netconfig -f update,” it fixes the problem immediately without a reboot, as compared to deleting /etc/resolv.conf which requires a reboot.

The below is the contents of /etc/resolv.conf right after boot when I cannot connect:


# ProtonVPN DNS - protonvpn-cli
nameserver 10.8.8.1

But if I delete the file and reboot, connectivity is restored, with /etc/resolv.conf being:


### /etc/resolv.conf file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
#     NETCONFIG_DNS_STATIC_SEARCHLIST
#     NETCONFIG_DNS_STATIC_SERVERS
#     NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
#     NETCONFIG_DNS_POLICY=''
#
# See also the netconfig(8) manual page and other documentation.
#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
# only, the netconfig settings are same with settings in this
# file and in case of a "netconfig update -f" call.
#
### Please remove (at least) this line when you modify the file!
nameserver 192.168.115.253

As was mentioned, ProtonVPN is not deleting /etc/resolv.conf as it should. This is strange because it must do it on Linux Mint Cinnamon and Sparky LXDE. I will open a trouble ticket with them.

Thanks to everyone who responded. “netconfig -f update” is an immediate solution and not difficult to implement. If I can figure out what script is called just before system shutdown, I will add “netconfig -f update” at the end.

Thanks for reporting back.

I missed that you reported two resolv.conf listings. I shluld have looked more into the details. But the CODE tags do help enormous.

I do not know about ProtonVPN, but I see that nrickert does.

I indeed offered the netconfig as a shortcut to get things going, not as an end-solution. I am glad it works.

I built an openSUSE system; it has the same bug. And ProtonVPN advised me to find a more reliable distribution.

Hi
That’s funny… maybe you should find a better, more linux savy vpn provider…?

I would imagine a network script could be crafted to trigger the netconfig -f update as you switch networks.

I suppose you are using protonvpn client, but you can also connect using a plain openvpn client. (protoncli is a simple wrapper around openvpn)
Openvpn package let you fine control over resolv.conf modification. Of course you will loose some other protonvpn client feature, like the ability to quickly change the server.

According to what you have posted,
Your VPN is likely configured with a DNS nameserver which is not functional in the 10.x.y.z network.
When you reboot,
You’re using a DNS nameserver in the 192.168.y.z network.

Nowhere in your posts did you post the following essential information…

  • Are you starting your VPN on boot, or are you launching the VPN manually after you logon to your machine?
  • What is the NetworkID (If you don’t know what this is, you should post your network address and subnet mask) of your VPN?

And, to a lesser degree it might be important to know if your VPN configuration is configured to allow DNS leakage which is common but inadvisable… It’s defined by using non-VPN nameservers when your VPN is active.

TSU

@malcomlewis

Yeah, I forgot to add a smiley-face at the end of my last comment. That was a fairly arrogant statement to make regarding one of the top Linux distributions.

My solution was to stick with Gecko Linux, but create a simple script that includes two lines to start ProtonVPN:

netconfig -f update
pvpn -c

Thanks to everyone who contributed.