Operating System - Linux
1829467 Members
1388 Online
109991 Solutions
New Discussion

how to configure bind to resove only domainname as 'domain.com'

 
SOLVED
Go to solution

how to configure bind to resove only domainname as 'domain.com'

my server is bind server in linux,
it can resovle the domainname as "xxx.mydomain.com", however, i do not know at all how to configure it to resolve the domainame as "mydomain.com" to default ip.
could somebody give me some sample?

Best Regards,
Frederick van targero
frederick van targero
6 REPLIES 6
Kodjo Agbenu
Honored Contributor

Re: how to configure bind to resove only domainname as 'domain.com'

Hello Frederick,

After having read and re-read your question, it is still not clear.

Could you please post /etc/named.conf and /etc/resolv.conf ?

Kodjo
Learn and explain...
Stuart Browne
Honored Contributor
Solution

Re: how to configure bind to resove only domainname as 'domain.com'

Your zone file requres a line (near the top) with just:

@ IN A ip.of.mydomain.com

usually just after the SOA.

The @ refers to the host mentioned in the previous line (the domain record), and assigns it an address.
One long-haired git at your service...
U.SivaKumar_2
Honored Contributor

Re: how to configure bind to resove only domainname as 'domain.com'

Hi,

Edit your forward zone file and put records like this

xxx.mydomain.com IN A yyy.yyy.yyy.yyy
mydomain.com. IN CNAME xxx.mydomain.com.

Save the file and restart named daemon.

Now if you lookup xxx.mydomain.com or mydomain.com you will get the same IP address yyy.yyy.yyy.yyy

regards,

U.SivaKumar



Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: how to configure bind to resove only domainname as 'domain.com'

Hi,

Edit your forward zone file and put records like this

xxx.mydomain.com IN A yyy.yyy.yyy.yyy
mydomain.com. IN CNAME xxx.mydomain.com.

Save the file and restart named daemon.

Now if you lookup xxx.mydomain.com or mydomain.com you will get the same IP address yyy.yyy.yyy.yyy

regards,

U.SivaKumar



Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: how to configure bind to resove only domainname as 'domain.com'

Hi,

Edit your forward zone file and put records like this

xxx.mydomain.com IN A yyy.yyy.yyy.yyy
mydomain.com. IN CNAME xxx.mydomain.com.

Save the file and restart named daemon.

Now if you lookup xxx.mydomain.com or mydomain.com you will get the same IP address yyy.yyy.yyy.yyy

regards,

U.SivaKumar



Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: how to configure bind to resove only domainname as 'domain.com'

Hi,

Edit your forward zone file and put records like this

xxx.mydomain.com IN A yyy.yyy.yyy.yyy
mydomain.com. IN CNAME xxx.mydomain.com.

Save the file and restart named daemon.

Now if you lookup xxx.mydomain.com or mydomain.com you will get the same IP address yyy.yyy.yyy.yyy

regards,

U.SivaKumar



Innovations are made when conventions are broken