Please include exact error message you have got, if it is possible. Ideally whole command output, including parameters used and all messages it printed. Into preformatted text box. Like this, basic network status from nmcli:
$ nmcli
enp9s0u1: connected to Drátové připojení Dock
"Lenovo ThinkPad TBT3"
ethernet (r8152), 00:50:B6:B4:17:B2, hw, mtu 1500
ip4 default, ip6 default
inet4 10.43.2.229/24
route4 10.43.2.0/24 metric 100
route4 default via 10.43.2.254 metric 100
inet6 2620:52:0:2b02:b3ba:7320:65f8:1fff/64
inet6 fe80::b2f:65c5:d743:524b/64
route6 fe80::/64 metric 1024
route6 2620:52:0:2b02::/64 metric 100
route6 default via fe80::2aa2:4b00:645f:dfc1 metric 20100
enp0s31f6: unavailable
"Intel I219-LM"
ethernet (e1000e), XX:75:A4:XX:XX:XX, hw, mtu 1500
lo: unmanaged
"lo"
loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
DNS configuration:
servers: 10.0.0.15 10.0.0.26
domains: redhat.com
interface: enp9s0u1
servers: 10.0.1.245 10.0.1.245
I don’t think you want or need to change DNS. First, you should know what exactly is wrong. Try curl -v to example.org
and share the output:
$ curl -v https://example.org
* Trying 2606:2800:220:1:248:1893:25c8:1946:443...
* connect to 2606:2800:220:1:248:1893:25c8:1946 port 443 failed: Síť není dostupná
* Trying 93.184.216.34:443...
* Connected to example.org (93.184.216.34) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
* CApath: none
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted h2
* Server certificate:
* subject: C=US; ST=California; L=Los Angeles; O=Internet�Corporation�for�Assigned�Names�and�Numbers; CN=www.example.org
* start date: Jan 13 00:00:00 2023 GMT
* expire date: Feb 13 23:59:59 2024 GMT
* subjectAltName: host "example.org" matched cert's "example.org"
* issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1
* SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* h2h3 [:method: GET]
* h2h3 [:path: /]
* h2h3 [:scheme: https]
* h2h3 [:authority: example.org]
* h2h3 [user-agent: curl/7.85.0]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x55d27fcf0540)
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
> GET / HTTP/2
> Host: example.org
> user-agent: curl/7.85.0
> accept: */*
>
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
< HTTP/2 200
< age: 406934
< cache-control: max-age=604800
< content-type: text/html; charset=UTF-8
< date: Tue, 31 Oct 2023 18:09:53 GMT
< etag: "3147526947+gzip+ident"
< expires: Tue, 07 Nov 2023 18:09:53 GMT
< last-modified: Thu, 17 Oct 2019 07:18:26 GMT
< server: ECS (dcb/7EA2)
< vary: Accept-Encoding
< x-cache: HIT
< content-length: 1256
<
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
body {
background-color: #f0f0f2;
margin: 0;
padding: 0;
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
div {
width: 600px;
margin: 5em auto;
padding: 2em;
background-color: #fdfdff;
border-radius: 0.5em;
box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
}
a:link, a:visited {
color: #38488f;
text-decoration: none;
}
@media (max-width: 700px) {
div {
margin: 0 auto;
width: auto;
}
}
</style>
</head>
<body>
<div>
<h1>Example Domain</h1>
<p>This domain is for use in illustrative examples in documents. You may use this
domain in literature without prior coordination or asking for permission.</p>
<p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
</html>
* Connection #0 to host example.org left intact
That provides a lot of content, but can be debugged. If the machine you are trying has no working connection altogether, try appending >command_output.txt
to the command. That saves output into file, which you can upload to flash drive and share from a working system. At least photo of error would be much more helping than describing it as “curl error 6”.
If you are unsure whether you have got working connectivity, share output of these commands:
ip address
ip route
resolvectl
ping -c 5 _gateway
If you are sure you want to change dns servers permanently for this connection, nmcli connection edit $CONNECTION_ID
, followed by set ipv4.dns 8.8.8.8
and activate
should help. But usually autoconfiguration is the best option unless you know what and why you are doing. Network settings applet allows similar thing.