Mailing List Archive

connection does not survive a reboot
I am not able to edit this file:
daryl@trieli:~$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through
the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different
way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes
of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad

Using nano it reverts immediately, I can edit the linked
(/run/systemd/resolve/resolv.conf) file, changing the last two lines to :
nameserver 8.8.8.8, and nameserver 8.8.4.4 will establish an internet
connection, but it does not survive a reboot.
Any suggestions on how to remedy this?

TIA Daryl
Re: connection does not survive a reboot [ In reply to ]
On Sat, 7 Jan 2023 09:09:36 -0500, you wrote:

>I am not able to edit this file:
>daryl@trieli:~$ cat /etc/resolv.conf
># This file is managed by man:systemd-resolved(8). Do not edit.
>#
># This is a dynamic resolv.conf file for connecting local clients to the
># internal DNS stub resolver of systemd-resolved. This file lists all
># configured search domains.
>#
># Run "resolvectl status" to see details about the uplink DNS servers
># currently in use.
>#
># Third party programs must not access this file directly, but only through
>the
># symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different
>way,
># replace this symlink by a static file or a different symlink.
>#
># See man:systemd-resolved.service(8) for details about the supported modes
>of
># operation for /etc/resolv.conf.
>
>nameserver 127.0.0.53
>options edns0 trust-ad
>
>Using nano it reverts immediately, I can edit the linked
>(/run/systemd/resolve/resolv.conf) file, changing the last two lines to :
>nameserver 8.8.8.8, and nameserver 8.8.4.4 will establish an internet
>connection, but it does not survive a reboot.
>Any suggestions on how to remedy this?
>
>TIA Daryl

The /run directory tree is a virtual file system created at boot time
- it is all re-created each boot. Normally, if the PC is getting its
IP address via DHCP, it will also be getting the DNS server settings
via DHCP from your router (which the router received from its
connection to your ISP). And it will all work completely
automatically. But if you have manually assigned a static IP address,
no DHCP is being used and you will normally have to assign static DNS
server addresses also.

In recent Ubuntu versions, NetworkManager controls the network setup,
and you will have used a GUI to tell it to use a static IP address. So
you need to also tell it the correct DNS settings and have it put them
in /etc/resolv.conf. The way to do that varies depending on which
desktop you are using. Gnome has GUI that can do it in the Network
section of its Settings program, below where you set a static IP
address.

If you are using a desktop that does not have such a way of setting it
up (such as XFCE), I find the easiest way is to do static settings in
the /etc/network/interfaces file. Originally, this was the only
method of configuring network connections and there were scripts that
read the interfaces file and set things up from those settings. But
after NetworkManager came along, it now does that itself. If it finds
settings for an interface in the interfaces file, it will use those
settings and not do its usual automatic configuration of that network
interface. Here is an example of what I have to make my mother's
MythTV box work on my network:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.0.2.8
network 10.0.2.0
netmask 255.255.255.0
gateway 10.0.2.251
dns-nameservers 10.0.2.12 10.0.2.4
dns-search jsw.gen.nz
iface eth0 inet6 static
address 2406:E001:1:2802::8
netmask 64
gateway 2406:E001:1:2802::251
dns-nameservers 2406:E001:1:2802::12 2406:E001:1:2802::4
dns-search 6.jsw.gen.nz

Note that I run my own internal DNS servers, so the addresses for them
are on my local network. The dns-search lines tell the system to add
the listed partial name to the end of any incomplete names that are
looked up in the DNS. So if I look up "crw-pvr", it would actually be
looked up as "crw-pvr.jsw.gen.nz". So you would not normally use
those lines unless you are running a local DNS server.

Rather than using the Google DNS servers (8.8.8.8 and 8.8.4.4), it is
better to find your ISP's DNS server addresses (usually available on a
page in your router's setup pages or your ISP's help pages). ISPs
often have services on their internal network such CDN servers that
you really want to use in preference to connecting to a different copy
of the CDN service that is much further away. And that is done by
getting the correct IP addresses from your ISP's DNS servers.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: connection does not survive a reboot [ In reply to ]
On Sat, Jan 7, 2023 at 11:23 AM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> On Sat, 7 Jan 2023 09:09:36 -0500, you wrote:
>
> >I am not able to edit this file:
> >daryl@trieli:~$ cat /etc/resolv.conf
> ># This file is managed by man:systemd-resolved(8). Do not edit.
> >#
> ># This is a dynamic resolv.conf file for connecting local clients to the
> ># internal DNS stub resolver of systemd-resolved. This file lists all
> ># configured search domains.
> >#
> ># Run "resolvectl status" to see details about the uplink DNS servers
> ># currently in use.
> >#
> ># Third party programs must not access this file directly, but only
> through
> >the
> ># symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different
> >way,
> ># replace this symlink by a static file or a different symlink.
> >#
> ># See man:systemd-resolved.service(8) for details about the supported
> modes
> >of
> ># operation for /etc/resolv.conf.
> >
> >nameserver 127.0.0.53
> >options edns0 trust-ad
> >
> >Using nano it reverts immediately, I can edit the linked
> >(/run/systemd/resolve/resolv.conf) file, changing the last two lines to :
> >nameserver 8.8.8.8, and nameserver 8.8.4.4 will establish an internet
> >connection, but it does not survive a reboot.
> >Any suggestions on how to remedy this?
> >
> >TIA Daryl
>
> The /run directory tree is a virtual file system created at boot time
> - it is all re-created each boot. Normally, if the PC is getting its
> IP address via DHCP, it will also be getting the DNS server settings
> via DHCP from your router (which the router received from its
> connection to your ISP). And it will all work completely
> automatically. But if you have manually assigned a static IP address,
> no DHCP is being used and you will normally have to assign static DNS
> server addresses also.
>
> In recent Ubuntu versions, NetworkManager controls the network setup,
> and you will have used a GUI to tell it to use a static IP address. So
> you need to also tell it the correct DNS settings and have it put them
> in /etc/resolv.conf. The way to do that varies depending on which
> desktop you are using. Gnome has GUI that can do it in the Network
> section of its Settings program, below where you set a static IP
> address.
>
> If you are using a desktop that does not have such a way of setting it
> up (such as XFCE), I find the easiest way is to do static settings in
> the /etc/network/interfaces file. Originally, this was the only
> method of configuring network connections and there were scripts that
> read the interfaces file and set things up from those settings. But
> after NetworkManager came along, it now does that itself. If it finds
> settings for an interface in the interfaces file, it will use those
> settings and not do its usual automatic configuration of that network
> interface. Here is an example of what I have to make my mother's
> MythTV box work on my network:
>
> auto lo
> iface lo inet loopback
>
> auto eth0
> iface eth0 inet static
> address 10.0.2.8
> network 10.0.2.0
> netmask 255.255.255.0
> gateway 10.0.2.251
> dns-nameservers 10.0.2.12 10.0.2.4
> dns-search jsw.gen.nz
> iface eth0 inet6 static
> address 2406:E001:1:2802::8
> netmask 64
> gateway 2406:E001:1:2802::251
> dns-nameservers 2406:E001:1:2802::12 2406:E001:1:2802::4
> dns-search 6.jsw.gen.nz
>
> Note that I run my own internal DNS servers, so the addresses for them
> are on my local network. The dns-search lines tell the system to add
> the listed partial name to the end of any incomplete names that are
> looked up in the DNS. So if I look up "crw-pvr", it would actually be
> looked up as "crw-pvr.jsw.gen.nz". So you would not normally use
> those lines unless you are running a local DNS server.
>
> Rather than using the Google DNS servers (8.8.8.8 and 8.8.4.4), it is
> better to find your ISP's DNS server addresses (usually available on a
> page in your router's setup pages or your ISP's help pages). ISPs
> often have services on their internal network such CDN servers that
> you really want to use in preference to connecting to a different copy
> of the CDN service that is much further away. And that is done by
> getting the correct IP addresses from your ISP's DNS servers.
>

Thanks Stephen, I do use gnome desktop and have used network manager years
ago with a different VPN.
The free vpn I tried was all done automagically, and now I'm having trouble
undoing it. I found my ISP's primary DNS and secondary DNS, are you saying
I should be using these instead of google's? This would be only in the
interim until an automatic solution is found?

> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Re: connection does not survive a reboot [ In reply to ]
> On 8 Jan 2023, at 1:48 am, Daryl McDonald <darylangela@gmail.com> wrote:
>
>
>
> On Sat, Jan 7, 2023 at 11:23 AM Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
> On Sat, 7 Jan 2023 09:09:36 -0500, you wrote:
>
> >I am not able to edit this file:
> >daryl@trieli:~$ cat /etc/resolv.conf
> ># This file is managed by man:systemd-resolved(8). Do not edit.
> >#
> ># This is a dynamic resolv.conf file for connecting local clients to the
> ># internal DNS stub resolver of systemd-resolved. This file lists all
> ># configured search domains.
> >#
> ># Run "resolvectl status" to see details about the uplink DNS servers
> ># currently in use.
> >#
> ># Third party programs must not access this file directly, but only through
> >the
> ># symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different
> >way,
> ># replace this symlink by a static file or a different symlink.
> >#
> ># See man:systemd-resolved.service(8) for details about the supported modes
> >of
> ># operation for /etc/resolv.conf.
> >
> >nameserver 127.0.0.53
> >options edns0 trust-ad
> >
> >Using nano it reverts immediately, I can edit the linked
> >(/run/systemd/resolve/resolv.conf) file, changing the last two lines to :
> >nameserver 8.8.8.8, and nameserver 8.8.4.4 will establish an internet
> >connection, but it does not survive a reboot.
> >Any suggestions on how to remedy this?
> >
> >TIA Daryl
>
> The /run directory tree is a virtual file system created at boot time
> - it is all re-created each boot. Normally, if the PC is getting its
> IP address via DHCP, it will also be getting the DNS server settings
> via DHCP from your router (which the router received from its
> connection to your ISP). And it will all work completely
> automatically. But if you have manually assigned a static IP address,
> no DHCP is being used and you will normally have to assign static DNS
> server addresses also.
>
> In recent Ubuntu versions, NetworkManager controls the network setup,
> and you will have used a GUI to tell it to use a static IP address. So
> you need to also tell it the correct DNS settings and have it put them
> in /etc/resolv.conf. The way to do that varies depending on which
> desktop you are using. Gnome has GUI that can do it in the Network
> section of its Settings program, below where you set a static IP
> address.
>
> If you are using a desktop that does not have such a way of setting it
> up (such as XFCE), I find the easiest way is to do static settings in
> the /etc/network/interfaces file. Originally, this was the only
> method of configuring network connections and there were scripts that
> read the interfaces file and set things up from those settings. But
> after NetworkManager came along, it now does that itself. If it finds
> settings for an interface in the interfaces file, it will use those
> settings and not do its usual automatic configuration of that network
> interface. Here is an example of what I have to make my mother's
> MythTV box work on my network:
>
> auto lo
> iface lo inet loopback
>
> auto eth0
> iface eth0 inet static
> address 10.0.2.8
> network 10.0.2.0
> netmask 255.255.255.0
> gateway 10.0.2.251
> dns-nameservers 10.0.2.12 10.0.2.4
> dns-search jsw.gen.nz
> iface eth0 inet6 static
> address 2406:E001:1:2802::8
> netmask 64
> gateway 2406:E001:1:2802::251
> dns-nameservers 2406:E001:1:2802::12 2406:E001:1:2802::4
> dns-search 6.jsw.gen.nz
>
> Note that I run my own internal DNS servers, so the addresses for them
> are on my local network. The dns-search lines tell the system to add
> the listed partial name to the end of any incomplete names that are
> looked up in the DNS. So if I look up "crw-pvr", it would actually be
> looked up as "crw-pvr.jsw.gen.nz". So you would not normally use
> those lines unless you are running a local DNS server.
>
> Rather than using the Google DNS servers (8.8.8.8 and 8.8.4.4), it is
> better to find your ISP's DNS server addresses (usually available on a
> page in your router's setup pages or your ISP's help pages). ISPs
> often have services on their internal network such CDN servers that
> you really want to use in preference to connecting to a different copy
> of the CDN service that is much further away. And that is done by
> getting the correct IP addresses from your ISP's DNS servers.
>
> Thanks Stephen, I do use gnome desktop and have used network manager years ago with a different VPN.
> The free vpn I tried was all done automagically, and now I'm having trouble undoing it. I found my ISP's primary DNS and secondary DNS, are you saying I should be using these instead of google's? This would be only in the interim until an automatic solution is found?


2 points:

ubuntu runs a systemd resolver. For me trashing it made sense, but depending on what you are doing it may not be best for you

ie
$ dig google.com
if the resolver is 127.0.0.1 then you have it.

/etc/resolv.conf is a symlink to system files.
IE # rm /etc/resolve.conf # vi /etc/resolv.conf THAT file wont be changed
I did not show sudo for root, and I hate nano. Do what works for you.

I lamented to Mike yesterday that debian et al have introduced so many special rules that turned straight-forward into utter-magic

James
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: connection does not survive a reboot [ In reply to ]
On Sat, 7 Jan 2023 12:48:17 -0500, you wrote:

>Thanks Stephen, I do use gnome desktop and have used network manager years
>ago with a different VPN.
>The free vpn I tried was all done automagically, and now I'm having trouble
>undoing it. I found my ISP's primary DNS and secondary DNS, are you saying
>I should be using these instead of google's? This would be only in the
>interim until an automatic solution is found?

Yes, use the ISP DNS servers. In my case, my ISP has Akamai CDN
servers on their network, so if I do not use their DNS servers, any of
the millions of sites that use Akamai will be directed to a US or
Australian server instead of my ISP's New Zealand one. So the speed
and responsiveness decreases quite a lot as the ping times to anything
outside NZ are quite large due to the distance that has to be
traveled. In your case the performance decrease will be less, as
there will be relatively nearby US CDN servers, but you may well
notice the difference if you are looking for it. And you may have
problems logging into your ISP account if you are not using their DNS.

If you are looking for the remnants of your VPN install, try looking
in /etc/NetworkManager, especially the "system-connections" and "VPN"
subdirectories. And in files in /var/lib/NetworkManager.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: connection does not survive a reboot [ In reply to ]
On Sat, Jan 7, 2023 at 10:50 PM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> On Sat, 7 Jan 2023 12:48:17 -0500, you wrote:
>
> >Thanks Stephen, I do use gnome desktop and have used network manager years
> >ago with a different VPN.
> >The free vpn I tried was all done automagically, and now I'm having
> trouble
> >undoing it. I found my ISP's primary DNS and secondary DNS, are you saying
> >I should be using these instead of google's? This would be only in the
> >interim until an automatic solution is found?
>
> Yes, use the ISP DNS servers. In my case, my ISP has Akamai CDN
> servers on their network, so if I do not use their DNS servers, any of
> the millions of sites that use Akamai will be directed to a US or
> Australian server instead of my ISP's New Zealand one. So the speed
> and responsiveness decreases quite a lot as the ping times to anything
> outside NZ are quite large due to the distance that has to be
> traveled. In your case the performance decrease will be less, as
> there will be relatively nearby US CDN servers, but you may well
> notice the difference if you are looking for it. And you may have
> problems logging into your ISP account if you are not using their DNS.
>
> If you are looking for the remnants of your VPN install, try looking
> in /etc/NetworkManager, especially the "system-connections" and "VPN"
> subdirectories. And in files in /var/lib/NetworkManager.
>
Thanks Stephen, I found it in /etc/NetworkManager, commented out the entire
file, rebooted and voila internet without editing.

> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>