From e2034e44cd73b30ec75b0e566fbcbd965112ca25 Mon Sep 17 00:00:00 2001
From: Mahammadali AGHABAYLI <69401842+aghabay@users.noreply.github.com>
Date: Sat, 17 Sep 2022 23:31:03 +0400
Subject: [PATCH] Contributing: Adding a new question regarding DNS (#293)
---
topics/linux/README.md | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/topics/linux/README.md b/topics/linux/README.md
index 53c3b62..b046feb 100644
--- a/topics/linux/README.md
+++ b/topics/linux/README.md
@@ -1401,6 +1401,38 @@ This is the TTL. When you lookup for an address using a domain/host name, your O
When you get a reply, this reply in cached in your OS for a certain period of time. This is period of time is also known as TTL and this is the meaning of 3515 number - it will be cached for 3515 seconds before removed from the cache and during that period of time, you'll get the value from the cache instead of asking DNS name servers for the address again.
+
+
+ How can we modify the network connection via `nmcli` command, to use `8.8.8.8` as a DNS server?
+
+1. Find the connection name:
+ ```
+ # nmcli con show
+ NAME UUID TYPE DEVICE
+ System ens5 8126c120-a964-e959-ff98-ac4973344505 ethernet ens5
+ System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ethernet --
+ ```
+ Here the connection name is "System ens5". Let's say we want to modify settings for this connection.
+
+2. Modify the connection to use 8.8.8.8 as DNS server:
+ ```
+ # nmcli con mod "System ens5" ipv4.dns "8.8.8.8"
+ ```
+
+3. We need to reactivate the connection for the change to take effect:
+ ```
+ nmcli con up "System ens5"
+ ```
+
+4. Verify our settings once more:
+ ```
+ cat /etc/resolv.conf
+ nmcli -f ipv4.dns con show "System ens5"
+ ```
+
+
+
+
### Packaging