dns_get_record() does not support a request to a specific NS server to determine the NS records of a domain.

Đang mở
#9,924 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
php
Lĩnh vực
networking

Hướng nghiên cứu

Bắt đầu bằng cách xem xét hành vi của dns_get_record() trong PHP và truy vấn tương đương của issue, dig NS @server domain. Xác định cách caller có thể chọn một authoritative server cụ thể, đồng thời xem xét DNS record API hiện có trước khi định nghĩa interface. Hoàn tất nghĩa là PHP có thể trực tiếp lấy các NS record của domain từ một server được chỉ định mà không gọi exec('dig ...').

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Category: DNS Extension: standard Feature
Description

The task is to determine. that my client, which is the owner of the domain, has specified the correct NS records with the registrar, and I can accept it for service on my dns server.

Many people mistakenly think that it is enough to check the NS-record of the domain, but it is not so!
To make things worse, almost all DNS-servers, after accepting a domain for service, create the same NS-records, so that the client could register subdomains (www, mail, etc.). But this NS record only affects subdomains or child domains, not the domain itself.
For example, I will take the domain umi.ru (it is very difficult to find a domain where these records are different).
dig +short NS umi.ru or var_export(dns_get_record('umi.ru', DNS_NS));

ns1.umi.ru.
ns2.umi.ru.
ns3.umi.ru.
ns4.umi.ru.

These NS records are specified by the DNS server, not the domain registrar, and affect subdomains, but not the domain itself.

To get the exact NS records that are specified at the domain registrar. and that respond directly to the domain, that is, to which DNS-server to apply when a request comes to this domain, you need to do the following.
1 Define the parent zone (domain level above) for umi.ru parent zone ru.
2 Get the list of NS-servers of the parent zone.
dig +short NS ru or var_export(dns_get_record('ru', DNS_NS));

a.dns.ripn.net.
b.dns.ripn.net.
d.dns.ripn.net.
e.dns.ripn.net.
f.dns.ripn.net.

3 Get the NS record from exactly one of these servers (authoritative servers).
dig NS @a.dns.ripn.net umi.ru or ... but there is no such function in php and you can't make this request through dns_get_record(). :-(

.......................................................................................
UMI.RU.                 345600 IN NS ns1.umi.RU.
UMI.RU.                 345600 IN NS ns2.umi.RU.
UMI.RU.                 345600 IN NS ns3.umi.RU.
.......................................................................................

Registry and order does not matter, but these 3 NS records prescribed, rather than 4 as above, the registrar of the domain and it is them that I need to get and check to be sure that I can bind this domain to my dns-server.
Most have the same, but it is not always the case and need to get the latter.

I need to be able to get them in php without calling exec('dig NS @a.dns.ripn.net umi.ru', $out, $exit); var_export($out);.

Ngôn ngữ chính
C
Star
40.4k
Fork
8.2k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
103

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của php/php-src

Tất cả issue của php/php-src

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.