{"id":2795,"date":"2024-11-04T09:04:43","date_gmt":"2024-11-04T15:04:43","guid":{"rendered":"https:\/\/lab.rapternet.us\/?p=2795"},"modified":"2024-09-27T21:08:46","modified_gmt":"2024-09-28T02:08:46","slug":"changing-dns-servers-with-networkmanager","status":"publish","type":"post","link":"https:\/\/lab.rapternet.us\/?p=2795","title":{"rendered":"Changing DNS Servers with NetworkManager"},"content":{"rendered":"\n<p>I&#8217;ve never used network manager before, and right now I have a need to change the DNS settings on a system of mine that just so happens to be using it. Let&#8217;s look at the commands to change the DNS servers using network manager.<\/p>\n\n\n\n<p>To modify the DNS server settings, we&#8217;ll want to call the network manager CLI modify connection and input the DNS settings we want to change. For the terminal, this becomes &#8220;nmcli con mod&#8221;. We then give it the connection name, &#8220;ipv4.dns&#8221; argument, and a list of the DNS servers to set. The full command can be seen below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nmcli con mod $connectionName ipv4.dns \"8.8.8.8 8.8.4.4\"<\/pre>\n\n\n\n<p><code>connectionName<\/code> can be found by command: <code>nmcli con<\/code>. In the question case, it will be <code>\"System eth0\"<\/code>as always, after configuration changes, restart the service<\/p>\n\n\n\n<p>As always, after configuration changes, restart the service<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">service NetworkManager restart<\/pre>\n\n\n\n<p>Now we should have our new DNS servers active for our network configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_enterprise_linux\/7\/html\/networking_guide\/sec-network_bridging_using_the_networkmanager_command_line_tool_nmcli\">RedHat NetworkManager Manual<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve never used network manager before, and right now I have a need to change the DNS settings on a system of mine that just so happens to be using it. Let&#8217;s look at the commands to change the DNS servers using network manager. To modify the DNS server settings, we&#8217;ll want to call the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/lab.rapternet.us\/?p=2795\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Changing DNS Servers with NetworkManager&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[67,14],"class_list":["post-2795","post","type-post","status-publish","format-standard","hentry","category-how-to","tag-network","tag-quick-bites"],"_links":{"self":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/2795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2795"}],"version-history":[{"count":5,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/2795\/revisions"}],"predecessor-version":[{"id":4447,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/2795\/revisions\/4447"}],"wp:attachment":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}