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