Skip to content

Commit e2034e4

Browse files
authored
Contributing: Adding a new question regarding DNS (bregman-arie#293)
1 parent 46dcd8e commit e2034e4

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

topics/linux/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,38 @@ This is the TTL. When you lookup for an address using a domain/host name, your O
14011401
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.
14021402
</b></details>
14031403

1404+
<details>
1405+
1406+
<summary> How can we modify the network connection via `nmcli` command, to use `8.8.8.8` as a DNS server? </summary><br><b>
1407+
1408+
1. Find the connection name:
1409+
```
1410+
# nmcli con show
1411+
NAME UUID TYPE DEVICE
1412+
System ens5 8126c120-a964-e959-ff98-ac4973344505 ethernet ens5
1413+
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ethernet --
1414+
```
1415+
Here the connection name is "System ens5". Let's say we want to modify settings for this connection.
1416+
1417+
2. Modify the connection to use 8.8.8.8 as DNS server:
1418+
```
1419+
# nmcli con mod "System ens5" ipv4.dns "8.8.8.8"
1420+
```
1421+
1422+
3. We need to reactivate the connection for the change to take effect:
1423+
```
1424+
nmcli con up "System ens5"
1425+
```
1426+
1427+
4. Verify our settings once more:
1428+
```
1429+
cat /etc/resolv.conf
1430+
nmcli -f ipv4.dns con show "System ens5"
1431+
```
1432+
</b>
1433+
1434+
</details>
1435+
14041436
<a name="questions-linux-packaging"></a>
14051437
### Packaging
14061438

0 commit comments

Comments
 (0)