this post was submitted on 29 Jun 2023
2 points (100.0% liked)

Linux

47591 readers
705 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hello friends! I kept searching how to do this but had trouble finding the information, but now that I have found out how to do it, I thought I would post it here in case others are looking for it.

Problem we are solving

You want to set the DNS server's address for your network connection. Typically, this is handled by DHCP server, but if you have enabled EnableNetworkConfiguration in the iwd config, then iwd is the one deciding which is your DNS server, and relays that information to your resolver, which in most cases is systemd-resolved but sometimes openresolv.

How to Set DNS

Go to /var/lib/iwd folder, and look for the file that holds NETWORK_NAME.psk (where NETWORK_NAME is the SSID of the network you are connected to).

In this file, you will find some text pre-written. If it does not exist already, create a [IPv4] section. Under this section, add the line DNS=192.168.1.1 or whatever you wanted the DNS server to be. Your file should end up having a section that looks like this:

[IPv4]
DNS=192.168.1.1

restart iwd server and now you should be connecting to the right DNS server!

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here