DNS Subdomain authorization

Source: Internet
Author: User
Tags domain name server subdomain

DNS Subdomain authorization

Forward zone:

Sub_zone_name in NS nsserver_sub_zone_name

Nsserver_sub_zone_name in a IP



. com

Mylinux.com. In NS ns1.mylinux.com.

In NS ns2.mylinux.com.

Ns1.mylinux.com. In A 192.168.10.2

Ns2.mylinux.com. In A 192.168.10.3


--------------------------------------------

Add 2 subdomain classes under Mylinux.com as follows

Mylinux.com.

Fin.mylinux.com. In NS ns1.fin.mylinux.com.

Ns1.fin.mylinux.com. In A 192.168.10.4



1. Defined on the primary server. Vim/var/named/mylinux.com.zone (subdomain and parent domain can no longer be in the same network)

[Email protected] ~]# Vim/var/named/mylinux.com.zone


$TTL 600

@ in SOA ns1.mylinux.com. Admin.mylinux.com. (

20170709

1H

5M

The

6H)


In NS ns2

In NS ns1

In MX ten Mail

NS2 in A 192.168.10.3

NS1 in A 192.168.10.2

Mail in A 192.168.10.4

www in A 192.168.10.2

www in A 192.168.10.3

FTP in CNAME www

Mylinux.com. In A 192.168.10.3

*.mylinux.com. In A 192.168.10.3



Fin in NS ns1.fin

Fin in NS ns2.fin

Ns1.fin in A 192.168.10.8

Ns2.fin in A 192.168.10.9


Market in NS Ns1.market

Ns1.market in A 192.168.10.20



[[email protected] ~]# RNDC Reload let the server reread

Server Reload Successful

The view from the server gets configured No. The surface works properly after being configured from the server

2. Next install the sub-domain name server

And the same as from the server installation process

[[email protected] yum.repos.d]# Yum list all |grep bind

[email protected] yum.repos.d]# Yum Remove bind-libs

[email protected] yum.repos.d]# Yum Remove bind-utils

Yum Install bind.i686

Network configuration

DNS points to yourself

Subdomain: fin.mylinux.com

Turn off SELinux

Empty firewall Rules Iptables-f

[Email protected] yum.repos.d]# Mv/etc/named.conf/etc/named.conf.back

[Email protected] yum.repos.d]# SCP [email protected]:/etc/named.conf/etc

[Email protected] yum.repos.d]# chgrp named/etc/named.conf

[Email protected] yum.repos.d]# vi/etc/named.conf


Options {

Directory "/var/named";

};

Zone "." in {

Type hint;

File "named.ca";

};

Zone "localhost" {

Type master;

File "Named.localhost";

Allow-transfer {none;};

};

Zone "Fin.mylinux.com" {

Type master;

File "fin.mylinux.com";

Allow-transfer {none;};

};

Zone "0.0.127.in-addr.arpa" {

Type master;

File "Named.loopback";

Allow-transfer {none;};

};

[[email protected] named]# SCP [email protected]:/var/named/mylinux.com.zone/var/named copied from the primary server for modification

[Email protected] named]# chgrp named Mylinux.com.zone

[Email protected] named]# MV Mylinux.com.zone fin.mylinux.com

[Email protected] named]# vim fin.mylinux.com

$TTL 600

@ in SOA ns1.fin.mylinx.com. Admin.fin.mylinux.com. (

2016071001

1H

3M

1D

1H

)

In NS ns1

In MX 9 mail

NS1 in A 192.168.10.4

Mail in A 192.168.10.100

www in A 192.168.10.101


----------------------------------------------------

Construction Completed:

The default empty domain is not known to the parent domain.

Forward {Only can not parse after forwarding to the established server |firest first forward, do not return the answer to find root}

Set up a subdomain server to forward it to the parent domain

[Email protected] named]# vim/etc/named.conf

Options {

Directory "/var/named";

Forward first;

Forwarders {192.168.10.2;}; (Global forwarding, except that fin.mylinux.com domains are all unexpectedly forwarded to the primary server)

};

Zone "." in {

Type hint;

File "named.ca";

};

Zone "localhost" {

Type master;

File "Named.localhost";

Allow-transfer {none;};

};

Zone "Fin.mylinux.com" {

Type master;

File "fin.mylinux.com";

Allow-transfer {none;};

};

Zone "0.0.127.in-addr.arpa" {

Type master;

File "Named.loopback";

Allow-transfer {none;};

};

--------------------------------------------------------------------------------------------


Options {

Directory "/var/named";

};

Zone "." in {

Type hint;

File "named.ca";

};

Zone "localhost" {

Type master;

File "Named.localhost";

Allow-transfer {none;};

};

Zone "Fin.mylinux.com" {

Type master;

File "fin.mylinux.com";

Allow-transfer {none;};

};

Zone "0.0.127.in-addr.arpa" {

Type master;

File "Named.loopback";

Allow-transfer {none;};

};

Zone "Mylinux.com" in {

Type forward; (Define an area individually, forwarding this area only)

Forward first;

Forwarders {192.168.10.2;};

};



This article from "Linux operation and Maintenance" blog, declined reprint!

DNS Subdomain authorization

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.