Feb 7, 2019 - People change DNS settings for a lot of reasons. Sometimes the websites are not loading properly, sometimes the scripts of the web page are. As you can see, dnsmasq service is running. So, it’s configured correctly. Installing and Configuring NFS Server: Ubuntu 18.04 LTS Desktop uses casper to boot into Live DVD mode. Casper supports network boot via NFS only. So, in order to boot Ubuntu 18.04 LTS and any Ubuntu derivatives via PXE, you need to have a fully functional NFS server accessible over the network.
Working with Ubuntu 18.04 Server LTS. I am trying to find a way to check the DNS IP(s) that is actually being used when set via DHCP. The resolv.conf only will point to 127.0.0.53 now. /etc/systemd/network folder is empty. The NSLOOKUP output also always references the internal 127.0.0.53 IP. Seems all the old tricks aren't working.
The Ubuntu documentation is not updated yet as it still looks like the help for 16.04 referencing eth0, ifup and ifdown which are all deprecated on 18: https://help.ubuntu.com/lts/serverguide/network-configuration.html
I've tried setting a static adapter setup with Netplan via a custom .yaml. The settings work fine but I can't seem to find the DNS IP that I set anywhere. I expect it will be consistent between DHCP and static settings but I'm not sure where to look now.
I would settle for either a C library call or a bash CLI method at this point. Does anyone have a way to check this on 18.04 Server?
Nathan SmithNathan Smith39411 gold badge33 silver badges1212 bronze badges
3 Answers
I found the following showed my the DNS servers by adapter towards the end of the output:
It contains a list under 'DNS Servers' organized by Link. I think this has changed from previous versions with Ubuntu. It will take a little text parsing work but this gives me what I'm after.
Nathan SmithNathan Smith39411 gold badge33 silver badges1212 bronze badges
Another way is:
That file is dynamically generated by systemd-resolved, but contains the actual DNS servers instead of 127.0.0.53.
In fact, if you want make that the default for
/etc/resolv.conf
, you simply create symlink for it. (/etc/resolv.conf
is a symlink that points to /run/systemd/resolve/stub-resolv.conf
by default):Sample
/run/systemd/resolve/resolv.conf
:For more info:
wisbuckywisbucky13k44 gold badges6969 silver badges6060 bronze badges
I am suprised at this too. I am running Ubuntu 16.04 LTS and see something similar.
If you issue a Ps2 rom romancing saga japan.
The first host in the response is the one doing the lookups for your server.
This means that this box is doing it's own dns lookups directly to the root servers and following the path recursively to get my dns lookups.
Found the issue is that dnsmasq is enabled. To disable it do as follows.
edit the NetworkManager.conf file
comment out the dnsmasq line
restart the network-manager service
then verify that it is using the dns-server assigned via dhcp
webmitewebmite
Not the answer you're looking for? Browse other questions tagged ubuntu-server or ask your own question.
@RlndVt I suspect one or more of your configuration files have wound up with invalid settings as things have changed back and forth. Or for some reason resolved has not reloaded its configuration files after they have changed.
Critical revisionism has tended to undervalue the Supremes’ accomplishments, categorizing their work as more lightweight than the best soul stars (or even the best Motown stars), and viewing them as a tool for Berry Gordy’s crossover aspirations.
The Supremes – Albums CollectionEAC Rip 17xCD FLAC Tracks & Image + Cue + Log Full Scans IncludedTotal Size: 6.77 GB 3% RAR RecoveryALBUMS & COMPILATIONSLabel: Various Genre: R&B, doo-wopThe most successful American performers of the 1960s, the Supremes for a time rivaled even the Beatles in terms of red-hot commercial appeal, reeling off five number one singles in a row at one point.
If you could please try the following steps:
- Restore /etc/resolve.conf to its initial default state - contains:
nameserver 127.0.0.1 - Check that /etc/systemd/resolved.conf contains
DNSStubHandler=no - Force a reload of all of systemd-resolved's configuration files
sudo systemctl reload-or-restart systemd-resolved - Repair Pi-hole (to ensure dnsmasq's config files are correct)
pihole -r - Then, if you could please report the output of
systemctl status dnsmasq.service systemd-resolved
Should they not both be running:
- if you could please try:
sudo systemctl daemon-reload - then once again
pihole -r - and once again, please report the output of
systemctl status dnsmasq.service systemd-resolved
Systemd-resolved and dnsmasq.service can coexist quite happily so long as resolved lets go of port 53. Once your config files are correctly restored, your output should look something like this, taken from a working pi-hole install on bionic.
#systemctl status dnsmasq.service systemd-resolved
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2018-05-18 07:10:40 AEST; 5min ago
Process: 860 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
Process: 825 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
Process: 801 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Main PID: 854 (dnsmasq)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/dnsmasq.service
└─854 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,19036,8,2,49aac11d7b6f6446702e54a1607371607a1a4
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2018-05-18 07:10:40 AEST; 5min ago
Process: 860 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
Process: 825 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
Process: 801 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Main PID: 854 (dnsmasq)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/dnsmasq.service
└─854 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,19036,8,2,49aac11d7b6f6446702e54a1607371607a1a4
May 18 07:10:40 bionicbox systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server..
May 18 07:10:40 bionicbox dnsmasq[801]: dnsmasq: syntax check OK.
May 18 07:10:40 bionicbox systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
May 18 07:10:40 bionicbox dnsmasq[801]: dnsmasq: syntax check OK.
May 18 07:10:40 bionicbox systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
● systemd-resolved.service - Network Name Resolution
Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2018-05-18 07:10:39 AEST; 5min ago
Docs: man:systemd-resolved.service(8)
https://www.freedesktop.org/wiki/Software/systemd/resolved
https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
Main PID: 382 (systemd-resolve)
Status: 'Processing requests..'
Tasks: 1 (limit: 4915)
CGroup: /system.slice/systemd-resolved.service
└─382 /lib/systemd/systemd-resolved
Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2018-05-18 07:10:39 AEST; 5min ago
Docs: man:systemd-resolved.service(8)
https://www.freedesktop.org/wiki/Software/systemd/resolved
https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
Main PID: 382 (systemd-resolve)
Status: 'Processing requests..'
Tasks: 1 (limit: 4915)
CGroup: /system.slice/systemd-resolved.service
└─382 /lib/systemd/systemd-resolved
May 18 07:10:37 bionicbox systemd[1]: Starting Network Name Resolution..
May 18 07:10:39 bionicbox systemd-resolved[382]: Positive Trust Anchors:
May 18 07:10:39 bionicbox systemd-resolved[382]: . IN DS 19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5
May 18 07:10:39 bionicbox systemd-resolved[382]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
May 18 07:10:39 bionicbox systemd-resolved[382]: Negative trust anchors: 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr
May 18 07:10:39 bionicbox systemd-resolved[382]: Using system hostname 'bionicbox'.
May 18 07:10:39 bionicbox systemd[1]: Started Network Name Resolution.
May 18 07:10:39 bionicbox systemd-resolved[382]: Positive Trust Anchors:
May 18 07:10:39 bionicbox systemd-resolved[382]: . IN DS 19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5
May 18 07:10:39 bionicbox systemd-resolved[382]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
May 18 07:10:39 bionicbox systemd-resolved[382]: Negative trust anchors: 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr
May 18 07:10:39 bionicbox systemd-resolved[382]: Using system hostname 'bionicbox'.
May 18 07:10:39 bionicbox systemd[1]: Started Network Name Resolution.