Hi All,
How do I tell dhcp-client to use a DNS server of my choosing and not what comes from the dhcp server?
Many thanks, -T
On 4/23/23 19:17, ToddAndMargo via users wrote:
How do I tell dhcp-client to use a DNS server of my choosing and not what comes from the dhcp server?
You set it in the networkmanager connection config. In the IPV4 section, turn off automatic DNS and enter your DNS server address.
On 4/23/23 19:34, Samuel Sieb wrote:
On 4/23/23 19:17, ToddAndMargo via users wrote:
How do I tell dhcp-client to use a DNS server of my choosing and not what comes from the dhcp server?
You set it in the networkmanager connection config. In the IPV4 section, turn off automatic DNS and enter your DNS server address.
How about if I am, not running networkmanager?
# networkmanager bash: networkmanager: command not found
On 4/23/23 19:38, ToddAndMargo via users wrote:
On 4/23/23 19:34, Samuel Sieb wrote:
On 4/23/23 19:17, ToddAndMargo via users wrote:
How do I tell dhcp-client to use a DNS server of my choosing and not what comes from the dhcp server?
You set it in the networkmanager connection config. In the IPV4 section, turn off automatic DNS and enter your DNS server address.
How about if I am, not running networkmanager?
# networkmanager bash: networkmanager: command not found
Found how to add an "addition" dns but not how to get rid of the one from dhcp-client
# nmcli device mod eno2 ipv4.dns "127.0.0.1"
upping and downing the connection still gives me
# cat /etc/resolv.conf
# Generated by NetworkManager search netgear.com acme.local nameserver 127.0.0.1 nameserver 192.168.250.1
I need now to get rid of the 192 dns
On 4/23/23 19:38, ToddAndMargo via users wrote:
On 4/23/23 19:34, Samuel Sieb wrote:
On 4/23/23 19:17, ToddAndMargo via users wrote:
How do I tell dhcp-client to use a DNS server of my choosing and not what comes from the dhcp server?
You set it in the networkmanager connection config. In the IPV4 section, turn off automatic DNS and enter your DNS server address.
How about if I am, not running networkmanager?
# networkmanager bash: networkmanager: command not found
It doesn't work like that. You're clearly using NetworkManager because you are running nmcli.
I was referring to the Gnome network control panel, but you can do the same thing using nm-connection-editor or editing the config files or running nmcli.
nmcli device mod eno2 ipv4.ignore-auto-dns yes
On 4/23/23 19:48, Samuel Sieb wrote:
On 4/23/23 19:38, ToddAndMargo via users wrote:
On 4/23/23 19:34, Samuel Sieb wrote:
On 4/23/23 19:17, ToddAndMargo via users wrote:
How do I tell dhcp-client to use a DNS server of my choosing and not what comes from the dhcp server?
You set it in the networkmanager connection config. In the IPV4 section, turn off automatic DNS and enter your DNS server address.
How about if I am, not running networkmanager?
# networkmanager bash: networkmanager: command not found
It doesn't work like that. You're clearly using NetworkManager because you are running nmcli.
I was referring to the Gnome network control panel, but you can do the same thing using nm-connection-editor or editing the config files or running nmcli.
nmcli device mod eno2 ipv4.ignore-auto-dns yes
Ha!
Works great:
# nmcli connection modify "Wired connection 2" ipv4.ignore-auto-dns yes
This did not: # nmcli device modify eno2 ipv4.ignore-auto-dns yes
Thank you Sam!!!!