LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-01-2023, 09:51 PM   #1
LinuxCNewbie
LQ Newbie
 
Registered: Feb 2023
Posts: 3

Rep: Reputation: 0
changing DNS Configuration


Hi Linux gurus,

I'm having a problem with Linux with DNS Configuration:

been using fedora, win10 2019 server, win 10 enterprise.

it is only fedora and kali
ok so when I type in nmcli I get my dns configuration as:

servers: 192.168.0.1
domains: ht.home
interface: eth0

it should be
servers: 172.16.1.5 172.16.1.1
domains:example.com
domains: ht.home

How can I change this?

Thank you!
 
Old 02-01-2023, 10:54 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,631

Rep: Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696
#1 is 192.168.0.1 your router? It may be picking that up via DHCP.

#2 Check your network settings. There should be a tab there where you can change the DNS settings.

There may be a more detailed Fedora answer, but I no longer run Fedora so I will wait for that input from someone current on Fedora settings.
 
1 members found this post helpful.
Old 02-01-2023, 11:28 PM   #3
LinuxCNewbie
LQ Newbie
 
Registered: Feb 2023
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by wpeckham View Post
#1 is 192.168.0.1 your router? It may be picking that up via DHCP.

#2 Check your network settings. There should be a tab there where you can change the DNS settings.

There may be a more detailed Fedora answer, but I no longer run Fedora so I will wait for that input from someone current on Fedora settings.
Thank you for replying back I will have a look at the network settings and see but doing some research online do I have to change the /etc/resolve.conf file as well?
 
Old 02-02-2023, 07:42 AM   #4
Madhu Desai
Member
 
Registered: Mar 2013
Distribution: Rocky, Fedora, Ubuntu
Posts: 541

Rep: Reputation: 153Reputation: 153
This is what you can do.

First, find your connection:
Code:
# nmcli connection show
NAME                UUID                                  TYPE      DEVICE 
Wired connection 1  dcf077fb-9f98-3f78-b449-9d6e4136a6ad  ethernet  enp0s3
Check your current values. For example, to determine which domain searches were set up, do the following:
Code:
# nmcli connection show 'Wired connection 1' | grep dns-search
ipv4.dns-search:                        --
ipv6.dns-search:                        --
If you're hosting a DNS server on this system, it's best to keep the IP address static. Assuming your IP address is 192.168.122.36, I'll do the follows:
Code:
# nmcli connection modify 'Wired connection 1' ipv4.addresses 192.168.122.36/24
# nmcli connection modify 'Wired connection 1' ipv4.gateway 192.168.122.1
# nmcli connection modify 'Wired connection 1' ipv4.dns 192.168.122.36,8.8.8.8,8.8.4.4
# nmcli connection modify 'Wired connection 1' ipv4.dns-search example.com,ht.home
# nmcli connection modify 'Wired connection 1' ipv4.method manual
# nmcli connection down 'Wired connection 1'
# nmcli connection up 'Wired connection 1'
Then my nmcli output will be something like this:
Code:
# nmcli
...
...
DNS configuration:
        servers: 192.168.122.36 8.8.8.8 8.8.4.4
        domains: example.com ht.home
        interface: enp0s3
 
Old 02-02-2023, 10:38 AM   #5
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,631

Rep: Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696
Quote:
Originally Posted by LinuxCNewbie View Post
Thank you for replying back I will have a look at the network settings and see but doing some research online do I have to change the /etc/resolve.conf file as well?
If you have menu driven settings, those change the files that are scanned for the system to BUILD the /etc/resolv.conf file.

I rather miss the days when we managed all of that in flat files manually, but nearly all systems automate that now and will override anything you do manually on the next boot.

If the distribution menu system does not contain a section for setting those things (generally in the interface settings) then the network app (NetworkManager is most common) will be used for settings those things.
 
Old 02-03-2023, 09:28 PM   #6
LinuxCNewbie
LQ Newbie
 
Registered: Feb 2023
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you very much everyone for the feedback as I followed your advised and was able to fix the issue!
 
Old 02-03-2023, 11:57 PM   #7
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,631

Rep: Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696
Quote:
Originally Posted by LinuxCNewbie View Post
Thank you very much everyone for the feedback as I followed your advised and was able to fix the issue!
Great! You might then want to mark this thread SOLVED.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Doggo Is A DNS Lookup Utility With Colorful Output, DNS-overTLS and DNS-over-HTTPS Support LXer Syndicated Linux News 0 04-07-2021 02:30 AM
A DNS learner's question->Is my DNS configuration right? saagar Linux - Newbie 4 01-12-2009 08:44 AM
DNS configuration and configuration file in RHEL5 remo1225 Linux - Newbie 1 02-20-2008 04:25 AM
Win2k3 DNS + PFsense DNS Forwarder = No internal DNS resolution Panopticon Linux - Networking 1 11-19-2007 09:59 PM
Problem changing the video adapter setting and changing the screen resolution habiblove Linux - General 3 02-18-2006 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration