Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Subdomain authorization

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Authorize child domains on the parent domain .ocm-- > mageedu.com

Mageedu IN NS ns1.mageedu.com.

IN NS ns2.mageedu.com.

Ns1.mageedu.com IN A 192.168.100.1

Ns2.mageedu.com IN A 192.168.100.2

Now I want to authorize a subdomain called fin and one called market: (may not be in a network segment)

Fin.mageedu.com. IN NS ns1.fin.magedu.com.

Ns1.fin.magedu.com. IN A 192.168.100.3

(you can also create two name servers for fin; the above letter replication only needs to be changed to IP)

Market IN NS ns1.market.mageedu.com.

Ns1.market.mageedu.com. IN A 192.168.9.4

# # #

Vim / var/named/mageedu.com.zone edit this field

Fin IN NS ns1.fin (as long as you write NS, you will know it is a subdomain)

Ns1.fin IN A 192.168.100.3

Market IN NS ns1.market.mageedu.com.

Ns1.market.mageedu.com. IN A 192.168.9.4

Modify serial number + 1

Service named restart restart

@ @ 2

Clone a virtual machine

Configure the IP address to 9.4

0. Set the IP DNS server to point to itself, and the search domain is fin.mageedu.com

Restart the network

1 、 vim / etc/named.conf

2. Leave named.ca;named.localhost;named.loopback

3. Zone "fin.mageedu.com" IN {

Type master

File "fin.mageedu.com.zone"

}

4. Cd / var/named;; mv mageedu.com.zone fin.mageedu.com.zone

5. Editor: $TTL 86400

@ IN SQA ns1.fin.mageedu.com admin.fin.mageedu.com. (

2013040201

2H

10M

7D

2D)

IN NS ns1

IN MX 10 mail

Ns1 IN A 192.168.9.3

Mail IN A 192.168.9.4

Www IN A 192.168.9.5

Wq restarts the network

6. Dig-t A www.fin.mageedu.com @ 192.168.9.3

7. Dig-t ns1.fin.mageedu.com @ 192.168.9.1 on the parent domain

You will see that there is a subdomain 9.3

# # #

Enable the parent domain to forward for the child domain

Fill in under the options option in the configuration file of the subdomain

Forward first;, if you forward it, you forward it. If you don't forward it, I'll find the root.

Forwarders {172.16.100.1;}; forward to the server 100.1

Restart the service

* *

Now I want to implement: if it is a request for mageedu.com, the domain will be forwarded to the parent domain, and nothing else will be forwarded.

Vim / etc/named.conf

Remove forward and forwarders from options

Add a set of zone "mageedu.com" IN {

Type forward

Forward first

Forwarders {172.16.100.1;}

}

Named-checkconf

Restart

# #

Check the IP address of com

Dig-t NS com

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report