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

ishanthar

New Member
Joined
Jun 11, 2019
Messages
1
Reaction score
0
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:


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..
 
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 " " " " "
 

Members online


Latest posts

Top