Linux Beginner-ddns Configuration Chapter

Source: Internet
Author: User
Tags hmac md5

Linux Beginner-ddns Configuration Chapter

If the DNS server is logging multiple hosts ' IPs, and the IP of those hosts is automatically obtained through the DHCPD service, it will be very difficult because the DNS settings do not know the host specific IP. If the DHCPD service can pass information to the DNS service after the host IP is configured, it will be much easier for the DNS service to log the data. This DHCPD service updates the DNS service data is DDNS.

When configuring DDNS, you need to configure the DNS service and the DHCPD service separately on a single host.

The DNS service is configured as follows:

A, "Dnssec-keygen-a hmac-md5-b 128-n HOST keydns". This is to generate a key for security reasons. "Keydns" is the key name and can be set by itself. "Cat Kwestos.+157+18569.key" To view the generated keys and copy them.

B, "Cp/etc/rndc.key/etc/keydns.key-p". Generates an encrypted file for DNS.

C, "Vim/etc/keydns.key". As shown, the 1th line is changed to "Keydns" and the 3rd line "" To the key copied in a.

D, "vim/etc/named.conf". As shown in the 47th line, "logging {" Before editing "include"/etc/keydns.key ";", which is the key file read by the specified DNS service.

E, "Vim/etc/named.rfc1913.zones". As shown, change the 28th line to "allow-update {key keydns;};", which is the specified we domain can be keydns updated.

The configuration of the DHCPD is as follows:

A, "Head-n 36/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example >/etc/dhcp/dhcpd.conf". Copy the first 36 lines of "Dhcpd.conf.example" to the "dhcpd.conf" file.

B, "vim/etc/dhcp/dhcpd.conf". Change line 7th and line 8th to the content shown. "We.com" is the domain name, "172.25.254.102" is the DNS IP. Remove the comment from line 14th. Comment out lines 27th and 28. Change lines 32nd through 35th to be configured as shown.

C, "vim/etc/dhcp/dhcpd.conf". Enter the content shown after line 36th.

Key Keydns {

Algorithm HMAC-MD5;

Secret z8app2bzit9gmvyzs28ija==;

};

Zone we.com. {

Primary 127.0.0.1;

Key Keydns;

}

When the DNS and DHCPD services are restarted, the server's DDNS configuration is complete.

When testing, set the host name of a host to "xxx.we.com", such as "123.we.com". Set the network to automatically obtain IP for DHCP, as shown in the automatically obtained IP is "172.25.254.65".

Enter "Dig 123.we.com" on the host with Ddns and, as shown, you can see the host IP and hostname of the test. This completes the DHCPD service's data synchronization with the DNS service.

Linux Beginner-ddns Configuration Chapter

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.