0

I have two PCs on my local network running Ubuntu. One is running 16.04 and the other is running 18.04.

I was having trouble accessing other devices/PCs on my local network using their hosthame. I resolved this issue on the PC running 16.04 by adding 192.168.1.254 (ISP router) as an additional DNS server in the IPv4 settings of the wifi adapter.

I'm not able to edit the connection settings on the PC running 18.04 in the same way. I attempted to add the following netplan configuration to 01-network-manager-all.yaml (already existing file in /etc/netplan)

# Let NetworkManager manage all devices on this system
  network:
    version: 2
    renderer: NetworkManager
    ethernets:
      wlp3s0:
        nameservers:
          addresses: [192.168.1.254]

Then I ran sudo netplan apply but this did not help.

Any ideas on what else I can try?

0

Try changing DNS servers in NetworkManager (System settings -> Network).

Alternatively you can try to set DNS servers in systemd-resolved

sudo editor /etc/systemd/resolved.conf

Uncomment DNS= part and type your DNS servers space-separated.

Then restart systemd-resolved:

sudo systemctl restart systemd-resolved.service
   DNS=
       A space-separated list of IPv4 and IPv6 addresses to use as system DNS servers. DNS
       requests are sent to one of the listed DNS servers in parallel to suitable per-link
       DNS servers acquired from systemd-networkd.service(8) or set at runtime by external
       applications. For compatibility reasons, if this setting is not specified, the DNS
       servers listed in /etc/resolv.conf are used instead, if that file exists and any
       servers are configured in it. This setting defaults to the empty list.

Read more at https://manpages.ubuntu.com/manpages/artful/man5/resolved.conf.5.html

  • I think I got it. I just wasn't able to find the adapter settings to add the DNS server (Settings -> Wi-Fi -> gear icon on connected network). Thanks for pointing me in that direction to have another look. It's not as easy to find these settings in 18.04 as in 16.04. – iamthebull May 2 at 2:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.