Change the dns switching mechanism to NetworkManager backend. #3

Open
opened 2024-05-28 08:55:25 -04:00 by sohrab · 3 comments
sohrab commented 2024-05-28 08:55:25 -04:00 (Migrated from git.parchlinux.com)

Created by: ARS101

Hi.

Not all distribution have systemd-resolved installed by default. E.g. Debian.
However all distributions have nmcli to set DNS.

This is an example of setting the DNS server using nmcli.

nmcli connection modify "<WIFI SSID>" ipv4.dns "<DNS IP 1>,<DNS IP 2>"
nmcli connection modify "<WIFI SSID>" ipv4.ignore-auto-dns "yes"

Also, network needs to be restarted in order to be effective.

nmcli device disconnect <Network Interface>
nmcli device connect <Network Interface>

Note: These aren't the perfect way to implement this change but they demonstrate the point.

I would suggest to change from systemd-resolved to nmcli to maximize portability.
We can also support both backends too, that would be a great idea as well.

*Created by: ARS101* Hi. Not all distribution have `systemd-resolved` installed by default. E.g. Debian. However all distributions have `nmcli` to set DNS. This is an example of setting the DNS server using nmcli. ```bash nmcli connection modify "<WIFI SSID>" ipv4.dns "<DNS IP 1>,<DNS IP 2>" nmcli connection modify "<WIFI SSID>" ipv4.ignore-auto-dns "yes" ``` Also, network needs to be restarted in order to be effective. ```bash nmcli device disconnect <Network Interface> nmcli device connect <Network Interface> ``` Note: These aren't the perfect way to implement this change but they demonstrate the point. I would suggest to change from systemd-resolved to nmcli to maximize portability. We can also support both backends too, that would be a great idea as well.
sohrab commented 2024-05-29 04:18:58 -04:00 (Migrated from git.parchlinux.com)

Created by: meshya

Is it possible to use nmcli for DoH or DoT ?

*Created by: meshya* Is it possible to use `nmcli` for DoH or DoT ?
sohrab commented 2024-05-29 15:11:04 -04:00 (Migrated from git.parchlinux.com)

Created by: ARS101

Is it possible to use nmcli for DoH or DoT ?

I'm not sure. But what I'm sure is that even installing systemd-resolved and testing it with shecan DNS or others yields me no results.
It instead adds to the existing DNS servers which causes conflict.

I'm not even sure if systemd-resolved can set DoH or DoT.

*Created by: ARS101* > Is it possible to use `nmcli` for DoH or DoT ? I'm not sure. But what I'm sure is that even installing systemd-resolved and testing it with shecan DNS or others yields me no results. It instead adds to the existing DNS servers which causes conflict. I'm not even sure if systemd-resolved can set DoH or DoT.
sohrab commented 2024-05-31 16:59:57 -04:00 (Migrated from git.parchlinux.com)

assigned to @sohrab

assigned to @sohrab
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: applications/namban#3
No description provided.