I’ve just received my L5 and ran into my first issues.
DNS seems not to be working when using a USB network hub.
Pinging my public DNS IP address works fine, but as soon as I enter a host name, then an error occurs.
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs should typically 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.
# No DNS servers known.
search .
With cellular and WiFi killed with their switches, and the dock connected, what does ifconfig show?
I assume that the ethernet port on the dock is successfully connected to something. Connected to what? Bear in mind that the phone will have a completely different MAC address on your LAN if you connect via the dock, as compared with via WiFi.
So these are your own DNS servers that you have explicitly set up? Obviously only you know whether you have any firewall or security rules that might prevent use of the DNS servers by the Librem 5.
Anyway, as ping has worked, you want to do nslookup on the Librem 5 and then at the prompt server aaa.bbb.ccc.ddd
and then some domain e.g. ns1.cloudflare.com.
(note the trailing dot)
for each of your two DNS servers.
You may want to see about enabling logging for a DNS server to shed light on what is going wrong.
Looking at /etc/resolv.conf though it seems the problem may be with DHCP, if you are using it for the Librem 5 to get an IP address. Are you running your own DHCP server?
First I apologize for the confusion.
Let me try again explaining how my network setup looks like and what I have been testing.
I’m using Ethernet over USB as described in my 1st and 3rd msg. This interface has been configured as:
Fixed IP address 192.168.0.50 (So no DHCP is used)
Mask 255.255.255.0
Default Gateway 192.168.0.254
DNS server 1: Provider DNS server IP address no 1>
DNS server 2: Provider DNS server IP address no 2>
Routes: Automatic
IP testing
Ping to IP address 127.0.0.1: OK
Ping to IP address L5: OK
Ping to IP address of my default gateway: OK
Ping to IP DNS server 1: OK
Ping to IP DNS server 2: OK
These results tell me that IP connectivity is OK
Ping to a host on the internet: Error Name or service not known
I’m not a Linux guy but have been playing around with the OS for a while now.
Some things I have discovered, but many things are new to me.
I’ve tried using dnslookup but the cli retuns the error: command not found.
Installing dnsutils fail with error: Unable to locate package dnsutil
So this tool I cannot use for troubleshooting.
You have to configure a DNS Server. Without one, your System can not resolve a Domain Name to an IP Adress. And you may have to add a (default) Route for Internet Access.
Example:
Your Router: 192.168.0.254
Your DNS-Server: 192.168.0.40
user $ sudo echo "nameserver 192.168.0.40" >> /etc/resolv.conf
Instead of using echo you can open /etc/resolv.conf with your favorite editor and insert the Line at the end of that File without “#” the commentary mark in that line.
(To undo that you set a commentary mark in front of the added line or delete it later.)
Whatch at all your Network Devices:
user $ ifconfig -a
And this will print your Routes:
user $ route
An example to set your default Route, to your LAN Gateway IP:
user $ sudo add default gw 192.168.0.254
And if you do not need it anymore:
user $ sudo del default gw 192.168.0.254
If you are from Europe and have less Network-Hops to: 46.182.19.48
You can use that Dns-Server IP instead of your local one, its from the German association Digitalcourage.
If you can ping it, you can use it too - if you have trust.
No, you can’t. If I had a dollar for every time this comes up, well OK I wouldn’t be able to afford another Librem 5 but still …
The shell handles I/O redirection e.g. >> beforesudo runs. So you need read access (for <) or otherwise write access in your own right in order to do it this way, in which case you don’t need sudo at all.
I think you are missing route in there i.e. sudo route add ...
Assuming that the DNS servers belong to the OP’s ISP (or anyone else on the internet) then there appears to be a reasonable default gateway - although we are missing actual ifconfig output. The OP says that ping to the DNS server works, so the default gateway should be OK.
I guess not. There’s no hard and fast rule. They aren’t essential to operation of the device - so maybe Purism is being more efficient in the use of disk space. For my money they should be installed though.
OK, so did you have an @ sign in front of the IP address?
Can you please be explicit: where are the DNS servers? Are they on your local network? Are they on the internet? Are they public DNS servers (like an ISP’s or Google’s or Cloudflare’s or …) or are they private DNS servers (employer’s or yours on VPSs or …)?
When diagnosing DNS problems … note the trailing dot - a hostname (like puri.sm) should be specified with a trailing dot (puri.sm.). A lot of the time it won’t make any difference but if you know you are having DNS problems, it could make a difference.
Can you confirm that this choice of the two DNS servers does work from other computers on your LAN?
This PC that you mention, is it running Linux or something else?
I’ve not used the “@” in front of the IP address.
Have done that now and the results are different:
; <<>> DiG 9.16.27-Debian <<>> @<ISP DNS server> puri.sm.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42654
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;puri.sm. IN A
;; ANSWER SECTION:
puri.sm. 300 IN A 138.68.253.24
;; Query time: 128 msec
;; SERVER: <>#53(<ISP DNS server>)
;; WHEN: Wed Apr 06 01:13:59 CEST 2022
;; MSG SIZE rcvd: 52
The DNS servers are the servers from my ISP and they (DNS servers) are not within my network.
The settings work fine for all other computers within my LAN.
As asked, the PC that I’m currently using is a Windows PC.
OK then I think the answer is clear. However you managed to configure the DNS server IP addresses into the interface on the Librem 5, it didn’t have the desired effect e.g. doesn’t show up in /etc/resolv.conf
How much troubleshooting do you want to do?
You could take a punt and just edit the DNS server IP addresses into that file - syntax is e.g. nameserver 1.1.1.1
(repeat such a line for each DNS server IP address)
(when things are working properly or half-working, changes to that file will get wiped out when you reboot but if things are really not working then changes won’t get wiped out)
or you would need to see, at least, whether the systemd-resolved service is starting properly e.g. systemctl status systemd-resolved
and I would probably check NetworkManager too e.g. systemctl status NetworkManager
or you could try changing your approach and use DHCP instead. You may have good reasons for wanting to avoid DHCP.
You may want to see whether there is any useful error message in the journal e.g. journalctl | grep 'Apr 06' | grep enx00e04c1604af
NetworkManager stores settings in files in /etc/NetworkManager/system-connections so you might want to see how many files are in there, whether one obviously associates with your dock’s ethernet connection, and whether it obviously has the right or wrong DNS server IP addresses.
NB: Files in that directory are protected against read access i.e. to examine the content of such a file you would need sudo cat /etc/NetworkManager/system-connections/whatever.nmconnection