Overriding IP4.DNS values on an interface



Hello,

I'm using Network Manager v1.22.16

I've got an eth0 connection profile configured for DHCP ([ipv4] -> method=auto)

When the connection profile is enabled, two DNS servers are received
on that particular interface, e.g.:

$ nmcli dev show eth0
...
IP4.DNS[1]:                             10.27.30.201
IP4.DNS[2]:                             10.27.30.202
...

All good.

Let's say that now I want to override the DNS server list on that
interface and remove those two DNS servers to add my own DNS server,
e.g. I want this scenario:

$ nmcli dev show eth0
...
IP4.DNS[1]:                             10.27.30.203
...

Is there a way to do this with nmcli or the DBUS apis?

Thanks in advance
Juan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]