Configure DNS on FreeBSD5.0

Source: Internet
Author: User
Article Title: Configure DNS notes on FreeBSD5.0. Linux is a technology channel of the IT lab in China. Some basic categories, such as desktop applications, Linux system management, kernel research, embedded systems, and open source systems, need to be configured in the LAN recently (shared Internet access at the same time). It took two days to get it done! Write the configuration process,
Hope to help beginners.

I. Network Environment
There are multiple computers in the LAN of a small enterprise, one of which is used as the NAT Gateway (10.198.253.148 ).
Shared Internet access through ADSL. Now we need to provide a DNS service to provide the DNS resolution for Internet sharing;
At the same time, the computer in the enterprise is assigned a Domain Name and accessed using the domain name.
Assume that the enterprise's domain is kaifa.com, and the domain names to be resolved include mail.kaifa.com (10.198.253.239 ),
Www.kaifa.com (10.198.253.228), DNS server domain name dns.kaifa.com (10.198.253.239 ).
Prerequisite: The named is running. Its version is 8.3.3-REL. For more information about the following configuration files, see.

Ii. Configuration File Content and description
1./etc/resolv. conf
Domain kaifa.com
Nameserver 127.0.0.1

2./etc/namedb/named. conf
Add:
Forwarders {
202.96.128.68
}; // This is the IP address of the Guangzhou DNS server on the Internet for Internet sharing. You can set no or other dns ip addresses.

Zone "kaifa.com "{
Type master;
File "kaifa.com. db ";
}; // This is the data file parsed by the kaifa.com domain

Zone "253.198.10.in-addr. arpa "{
Type master;
File "kaifa.com. rev ";
}; // This is the kaifa.com Reverse Domain parsing data file

3. Create the/etc/namedb/kaifa.com. db file with the following content:

$ TTL 3600

@ In soa dns.kaifa.com. root.dns.kaifa.com .(
2003022102; Serial
28800; Refresh
7200; Retry
604800; Expire
86400; Minimum
)
In ns dns.kaifa.com.
Localhost in a 127.0.0.1
Dns in a 10.198.253.239
Www in a 10.198.253.228
Mail CNAME dns

4. Create the/etc/namedb/kaifa.com. db file with the following content:

$ TTL 3600

@ In soa dns.kaifa.com. root.dns.kaifa.com .(
2003022101; Serial
28800; Refresh
7200; Retry
604800; Expire
86400; Minimum
)
In ns dns.kaifa.com.
228 in ptr www.kaifa.com.
239 in ptr mail.kaif.com.

5. # ndc reload // allow this command under ROOT for the configuration to take effect.
6. # nslookup // test.
7. You can resolve www/mail/dns.kaifa.com as long as the DNS of other computers is set to 10.198.253.239.

Iii. Postscript
I have checked a lot of information, but after all, it is the first configuration, and it is inevitable that there are mistakes. I hope you can correct me!
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.