Access Ubuntu and Cent OS servers which in network using FQDN instead of IP address

ishanthar

New Member
Credits
0
Hi,

There are few Linux servers need to access using FQDN within the network / Can access using IP address but need to access using FQDN

Only we have windows based DNS servers ( Server 2019), Need to know how we can fulfill this requirement.

Thanks,
 
Last edited:


Rob

Administrator
Staff member
Credits
376
You would need to set up the fqdn and ip in the dns servers you have running.. i'm not familiar w/ windows based dns servers, so I can't help you there..

If you're saying the linux servers need to be able to resolve fqdns on your network, then add the IP(s) of your DNS server in the Linux server /etc/resolv.conf file..
 

dos2unix

Well-Known Member
Credits
3,297
When you say "a few", it's hard to know how many that is.

If it's say a dozen or more, I would go with Rob's idea above.

It it's only 6 or 7 or so, you can add them to your /etc/hosts

However this could be over written at reboot, to prevent this in CentOS add this line to your
/etc/sysconfig/network-scripts/ifcfg-(whatever interface).cfg file.

PEERDNS=no

In CentOS, your /etc/resolv.conf file gets over written everytime you reboot.

The way to have this "auto-generated" for you, if you add these two lines to your
/etc/sysconfig/network-scripts/ifcfg-(whatever interface).cfg file.

DNS1=x.x.x.x (IP address of DNS server)
DNS2=x.x.x.x " " " " "
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Staff online


Top