CN112929466A - Method and system for detecting public network gateway IP and local domain name server IP - Google Patents

Method and system for detecting public network gateway IP and local domain name server IP Download PDF

Info

Publication number
CN112929466A
CN112929466A CN202110423267.1A CN202110423267A CN112929466A CN 112929466 A CN112929466 A CN 112929466A CN 202110423267 A CN202110423267 A CN 202110423267A CN 112929466 A CN112929466 A CN 112929466A
Authority
CN
China
Prior art keywords
domain name
server
message
request
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110423267.1A
Other languages
Chinese (zh)
Inventor
徐进平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wifire Beijing Technology Co ltd
Original Assignee
Wifire Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wifire Beijing Technology Co ltd filed Critical Wifire Beijing Technology Co ltd
Priority to CN202110423267.1A priority Critical patent/CN112929466A/en
Publication of CN112929466A publication Critical patent/CN112929466A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2514Translation of Internet protocol [IP] addresses between local and global IP addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a system for detecting a public network gateway IP and a local domain name server IP, wherein the method comprises the following steps: a client initiates a first domain name resolution request to a domain name corresponding to a detection server to acquire a detection server IP; the message responder acquires a public network gateway IP according to the detection request message; the message responder returns a response message generated by the detection request message to the client; the authoritative domain name resolver reads a local domain name server IP through a message of a second domain name resolution request initiated by the client; the authoritative domain name resolver returns the resolved detection server IP to a local domain name server, and the local domain name server returns the detection server IP to the client; the message responder returns the public network gateway IP and the local domain name server IP to the client according to the query request sent by the client; the client displays the public network gateway IP and the local domain name server IP, and the trouble of manually checking the public network gateway IP and the local domain name server IP is saved.

Description

Method and system for detecting public network gateway IP and local domain name server IP
Technical Field
The invention relates to the technical field of communication, in particular to a method and a system for detecting a public network gateway IP and a local domain name server IP.
Background
At present, the process of a client accessing a server corresponding to a domain name is as follows: (1) the client firstly carries out domain name resolution and sends a domain name resolution request to a local domain name server; (2) the local domain name server judges whether an address record corresponding to the domain name exists in a local cache, if so, the corresponding IP record is directly obtained and returned to the client; if the domain name resolution request does not exist, recursively forwarding the domain name resolution request to an authoritative domain name server, giving out a specified address record by the authoritative domain name server, and then sequentially returning the specified address record to the local domain name server and the client; (3) and the client accesses the corresponding server through the IP after acquiring the corresponding address record.
However, the above method also has some problems in practical use:
generally, in order to balance the load and enhance the system's ability to resist the risk of server crash, a domain name is usually associated with multiple servers and distributed in different geographical locations. The user may intentionally or unintentionally misconfigure the local domain name resolution server, resulting in the public network gateway IP and the local domain name server not being in the same network segment. For a domain name to be resolved, the local domain name server tends to resolve the domain name into an IP in the same network segment as the local domain name server. This will result in the analyzed IP addresses of the server and the client being far apart, and the number of times of forwarding the message is too many, thereby affecting the communication efficiency and reducing the communication speed.
In addition, an individual user can judge whether the local domain name server configuration is correct or not through a manual checking mode, but for operation and maintenance personnel managing a large number of servers, it is laborious and troublesome to acquire the public network IP and the local domain name server IP through a manual mode.
Disclosure of Invention
The invention aims to provide a method and a system for detecting a public network gateway IP and a local domain name server IP, so as to solve at least one technical problem in the prior art.
In order to achieve the purpose, the invention adopts the technical scheme that:
in a first aspect, an embodiment of the present invention provides a method for detecting a public network gateway IP and a local domain name server IP, including:
a client initiates a first domain name resolution request to a domain name corresponding to a detection server through a local domain name server to acquire an IP (Internet protocol) of the detection server; the detection server comprises a message responder and an authoritative domain name resolver;
the client sends a detection request message to the message responder, and the message responder acquires a public network gateway IP of the client according to a source IP of the detection request message;
the message responder generates a response message for the detection request message and returns the response message to the client;
after receiving the response message, the client reads the domain name in the response message; the client further initiates a second domain name resolution request to the domain name in the response message through the local domain name server so as to recurse the second domain name resolution request to the authoritative domain name resolver;
the authoritative domain name resolver reads the local domain name server IP through the source IP of the message of the second domain name resolution request;
the authoritative domain name server establishes a mapping relation between the local domain name server IP and the public network gateway IP;
the authoritative domain name resolver resolves the message of the second domain name resolution request to obtain the detection server IP, returns the detection server IP to the local domain name server, and returns the detection server IP to the client by the local domain name server;
the client sends a query request to the message responder according to the detection server IP so as to request the message responder to return the public network gateway IP and the local domain name server IP;
the message responder returns the public network gateway IP and the local domain name server IP to the client according to the query request;
and the client displays the public network gateway IP and the local domain name server IP.
Further, the response packet includes a special domain name, the special domain name includes a domain name prefix and a domain name suffix, the domain name prefix is a unique access request identifier, and the domain name suffix of the detection server are kept the same.
Further, the unique request access identifier is generated by the message responder.
Further, the unique request access identifier comprises a self-increment value, a time stamp and a public network gateway IP.
Further, after the message responder generates a response message for the detection request message and returns the response message to the client, the detection method further includes:
and the message responder stores the public network gateway IP into a buffer by taking the unique request identifier as a key and the public network gateway IP as a value.
Further, the reading, by the authoritative domain name resolver, the local domain name server IP through the source IP of the packet of the second domain name resolution request includes:
the authoritative domain name resolver receives the message of the second domain name resolution request, and reads the only request access identifier from the special domain name;
and reading the local domain name server IP by using the source IP of the unique request access identifier.
Further, after the authoritative domain name resolver reads the local domain name server IP through the source IP of the packet of the second domain name resolution request, before the authoritative domain name server establishes the mapping relationship between the local domain name server IP and the public network gateway IP, the detecting method further includes:
and the authoritative domain name resolver takes the unique request access identification as a key word and stores the local domain name server IP into a buffer.
Further, the analyzing the packet of the second domain name resolution request by the authoritative domain name resolver to obtain the detection server IP includes:
the authoritative domain name resolver resolves the message of the second domain name resolution request to obtain a domain name corresponding to the message of the second domain name resolution request;
and the authoritative domain name resolver compares whether the domain name suffix corresponding to the message of the second domain name resolution request is the same as the domain name suffix of the detection server, and if so, resolves the IP of the domain name corresponding to the message of the second domain name resolution request into the IP of the detection server.
Further, before the packet responder returns the public network gateway IP and the local domain name server IP to the client according to the query request, the detection method further includes:
and the message responder searches the buffer according to the unique request access identifier so as to obtain a public network gateway IP and a local domain name server IP corresponding to the unique request access identifier.
In a second aspect, an embodiment of the present invention provides a system for detecting a public network gateway IP and a local domain name server IP, where the system includes:
a client initiates a first domain name resolution request to a domain name corresponding to a detection server through a local domain name server to acquire an IP (Internet protocol) of the detection server; the detection server comprises a message responder and an authoritative domain name resolver;
the client sends a detection request message to the message responder, and the message responder acquires a public network gateway IP of the client according to a source IP of the detection request message;
the message responder generates a response message for the detection request message and returns the response message to the client;
after receiving the response message, the client reads the domain name in the response message; the client further initiates a second domain name resolution request to the domain name in the response message through the local domain name server so as to recurse the second domain name resolution request to the authoritative domain name resolver;
the authoritative domain name resolver reads the local domain name server IP through the source IP of the message of the second domain name resolution request;
the authoritative domain name server establishes a mapping relation between the local domain name server IP and the public network gateway IP;
the authoritative domain name resolver resolves the message of the second domain name resolution request to obtain the detection server IP, returns the detection server IP to the local domain name server, and returns the detection server IP to the client by the local domain name server;
the client sends a query request to the message responder according to the detection server IP so as to request the message responder to return the public network gateway IP and the local domain name server IP;
the message responder returns the public network gateway IP and the local domain name server IP to the client according to the query request;
and the client displays the public network gateway IP and the local domain name server IP.
The invention has the beneficial effects that:
the invention discloses a method and a system for detecting a public network gateway IP and a local domain name server IP, which can detect the public network gateway IP and the local domain name server IP used by a client in a message mode, wherein an authoritative domain name resolver and a message responder can monitor different ports respectively in the same process and share the same buffer, the message responder is used for writing the public network gateway IP of the client into the buffer, the authoritative domain name resolver is used for storing the local domain name server IP into the buffer, and when the client sends a query request to the message responder, the message responder returns the detected public network gateway IP and the local domain name server IP to the client and displays the public network gateway IP and the local domain name server IP on a command line or provides the public network gateway IP and the local domain name server IP for other programs.
Drawings
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a schematic flowchart of a method for detecting a public network gateway IP and a local domain name server IP according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a detection system for a public network gateway IP and a local domain name server IP according to another embodiment of the present invention.
Detailed Description
The following description is presented to disclose the invention so as to enable any person skilled in the art to practice the invention. The preferred embodiments in the following description are given by way of example only, and other obvious variations will occur to those skilled in the art. The basic principles of the invention, as defined in the following description, may be applied to other embodiments, variations, modifications, equivalents, and other technical solutions without departing from the spirit and scope of the invention.
It is understood that the terms "a" and "an" should be interpreted as meaning that a number of one element or element is one in one embodiment, while a number of other elements is one in another embodiment, and the terms "a" and "an" should not be interpreted as limiting the number.
The terminology used herein is for the purpose of describing various embodiments only and is not intended to be limiting. As used herein, the singular forms are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, numbers, steps, operations, components, elements, or combinations thereof, but do not preclude the presence or addition of one or more other features, numbers, steps, operations, components, elements, or groups thereof.
Example one
Referring to fig. 1 and fig. 2, a method for detecting a public network gateway IP and a local domain name server IP in this embodiment includes the following steps:
s1: a client initiates a first domain name resolution request to a domain name corresponding to a detection server through a local domain name server to acquire an IP (Internet protocol) of the detection server; the detection server comprises a message responder and an authoritative domain name resolver;
s2: the client sends a detection request message to the message responder, and the message responder acquires a public network gateway IP of the client according to a source IP of the detection request message; the detection request message comprises a 'prepareforsip' field;
s3: the message responder generates a response message for the detection request message and returns the response message to the client;
the response message comprises a special domain name, the special domain name comprises a domain name prefix and a domain name suffix, the domain name prefix is a unique access request identifier, and the domain name suffix of the detection server are kept the same; specifically, the message responder of the probe server generates a unique request access identifier for each probe request, where the unique request access identifier is used to identify a specific client;
for example: when a first detection request is made, the special domain name generated by the detection server is as follows: 10000001.202012201234.113.106.91.56. abc.com; 10000001 is the self-increment counter value, 202012201234 is the time stamp, and 113.106.91.56 is the public network gateway IP of the client.
S4, the client end reads the domain name in the response message after receiving the response message; the client further initiates a second domain name resolution request to the domain name in the response message through the local domain name server so as to recurse the second domain name resolution request to the authoritative domain name resolver;
specifically, for example: after receiving the response message, the client reads the special domain name 10000001.202012201234.113.106.91.56.abc.com in the response message, and initiates the second domain name resolution request to the special domain name through the local domain name server;
after receiving the message of the domain name of "10000001.202012201234.113.106.91.56. abc.com", the client initiates a domain name query request to the local domain name server, and since 10000001.202012201234.113.106.91.56.abc.com is a temporarily generated domain name, the domain name request must recurse to the authoritative domain name server.
S5: the authoritative domain name resolver reads the local domain name server IP through the source IP of the message of the second domain name resolution request;
specifically, the step S5 includes the following substeps:
s51: the authoritative domain name resolver receives the message of the second domain name resolution request, and reads the unique request access identifier and the public network gateway IP from the special domain name;
s52: the authoritative domain name resolver reads the local domain name server IP by using the source IP of the unique request access identifier, because the second domain name resolution request is recursively sent from the local domain name server to the authoritative domain name server, and the authoritative domain name server can acquire the local domain name server IP.
S6: the authoritative domain name server establishes a mapping relation between the local domain name server IP and the public network gateway IP;
s7: the authoritative domain name resolver resolves the message of the second domain name resolution request to obtain the detection server IP, returns the detection server IP to the local domain name server, and returns the detection server IP to the client by the local domain name server;
specifically, the analyzing the message of the second domain name resolution request by the authoritative domain name resolver to obtain the IP of the detection server includes the following substeps:
s71: the authoritative domain name resolver resolves the message of the second domain name resolution request to obtain a domain name corresponding to the message of the second domain name resolution request;
s72: and the authoritative domain name resolver compares whether the domain name suffix corresponding to the message of the second domain name resolution request is the same as the domain name suffix of the detection server, and if so, resolves the IP of the domain name corresponding to the message of the second domain name resolution request into the IP of the detection server.
S8: the client sends a query request to the message responder according to the detection server IP so as to request the message responder to return the public network gateway IP and the local domain name server IP;
the query request carries a 'GetIp' field and the special domain name, and the special domain name comprises a unique request identifier;
s9: the message responder returns the public network gateway IP and the local domain name server IP to the client according to the query request;
s10: the client displays the public network gateway IP and the local domain name server IP;
specifically, the client may display the public network gateway IP and the local domain name server IP on a command line, or provide them to other programs.
Preferably, after S3, the detection method further includes the steps of:
and the message responder stores the public network gateway IP into a buffer by taking the unique request identifier as a key and the public network gateway IP as a value.
Preferably, before S6, the detecting method further includes the steps of:
and the authoritative domain name resolver takes the unique request access identification as a key word and stores the local domain name server IP into a buffer.
Preferably, before S9, the detecting method further includes the steps of:
and the message responder searches the buffer according to the unique request access identifier so as to obtain a public network gateway IP and a local domain name server IP corresponding to the unique request access identifier.
Example two
Referring to fig. 2, the system for detecting a public network IP and a local domain name server IP in this embodiment includes:
a client initiates a first domain name resolution request to a domain name corresponding to a detection server through a local domain name server to acquire an IP (Internet protocol) of the detection server; the detection server comprises a message responder and an authoritative domain name resolver;
the client sends a detection request message to the message responder, and the message responder acquires a public network gateway IP of the client according to a source IP of the detection request message;
the message responder generates a response message for the detection request message and returns the response message to the client;
after receiving the response message, the client reads the domain name in the response message; the client further initiates a second domain name resolution request to the domain name in the response message through the local domain name server so as to recurse the second domain name resolution request to the authoritative domain name resolver;
the authoritative domain name resolver reads the local domain name server IP through the source IP of the message of the second domain name resolution request;
the authoritative domain name server establishes a mapping relation between the local domain name server IP and the public network gateway IP;
the authoritative domain name resolver resolves the message of the second domain name resolution request to obtain the detection server IP, returns the detection server IP to the local domain name server, and returns the detection server IP to the client by the local domain name server;
the client sends a query request to the message responder according to the detection server IP so as to request the message responder to return the public network gateway IP and the local domain name server IP;
the message responder returns the public network gateway IP and the local domain name server IP to the client according to the query request;
and the client displays the public network gateway IP and the local domain name server IP.
The detection system in this embodiment is basically the same as the detection method in the first embodiment, and is not described herein again.
Compared with the prior art, the invention has the following advantages:
therefore, according to the method and the system for detecting the public network gateway IP and the local domain name server IP, the authoritative domain name server and the message response server share the same rear-end buffer, firstly, the message responder and the authoritative domain name resolver store the only access request identifier in the rear-end buffer, and the authoritative domain name server establishes the mapping relation between the public network gateway IP of the client and the local domain name server IP; then, when the client needs to acquire the public network gateway IP of the client and the local domain name server IP configured by the public network gateway IP, a request carrying a unique request access identifier can be sent to the message responder, and then the message responder searches a buffer at the back end to acquire the public network gateway IP of the client and the local domain name server IP used in the domain name resolution, and further displays the public network gateway IP and the local domain name server IP on a command line or provides the public network gateway IP and the local domain name server IP for other programs;
according to the method and the system for detecting the public network gateway IP and the local domain name server IP, the public network gateway IP and the local domain name server IP of the client can be obtained, the trouble of manual checking is omitted, and the operation and maintenance efficiency is improved;
in addition, the method can be used as a command line program to run in the script, and can also be directly called by other programs, the query result can be further processed by using the program, and the working efficiency is greatly improved.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for detecting a public network gateway IP and a local domain name server IP comprises the following steps:
a client initiates a first domain name resolution request to a domain name corresponding to a detection server through a local domain name server to acquire an IP (Internet protocol) of the detection server; the detection server comprises a message responder and an authoritative domain name resolver;
the client sends a detection request message to the message responder, and the message responder acquires a public network gateway IP of the client according to a source IP of the detection request message;
the message responder generates a response message for the detection request message and returns the response message to the client;
after receiving the response message, the client reads the domain name in the response message; the client further initiates a second domain name resolution request to the domain name in the response message through the local domain name server so as to recurse the second domain name resolution request to the authoritative domain name resolver;
the authoritative domain name resolver reads the local domain name server IP through the source IP of the message of the second domain name resolution request;
the authoritative domain name server establishes a mapping relation between the local domain name server IP and the public network gateway IP;
the authoritative domain name resolver resolves the message of the second domain name resolution request to obtain the detection server IP, returns the detection server IP to the local domain name server, and returns the detection server IP to the client by the local domain name server;
the client sends a query request to the message responder according to the detection server IP so as to request the message responder to return the public network gateway IP and the local domain name server IP;
the message responder returns the public network gateway IP and the local domain name server IP to the client according to the query request;
and the client displays the public network gateway IP and the local domain name server IP.
2. The detection method according to claim 1, wherein the response packet includes a special domain name, the special domain name includes a domain name prefix and a domain name suffix, the domain name prefix is a unique access request identifier, and the domain name suffix is the same as the domain name suffix of the detection server.
3. The probing method of claim 2, wherein said unique request access identifier is generated by said message responder.
4. A probing method according to claim 2 or 3 wherein said unique request access identity comprises a self-incrementing counter, a timestamp and a public network gateway IP.
5. The probing method according to claim 2, wherein after the message responder generates a response message for the probe request message and returns the response message to the client, the probing method further comprises:
and the message responder stores the public network gateway IP into a buffer by taking the unique request identifier as a key and the public network gateway IP as a value.
6. The detection method according to claim 2, wherein the reading out the local domain name server IP by the authoritative domain name resolver through the source IP of the packet of the second domain name resolution request comprises:
the authoritative domain name resolver receives the message of the second domain name resolution request, and reads the only request access identifier from the special domain name;
and reading the local domain name server IP by using the source IP of the unique request access identifier.
7. The detecting method according to claim 5, wherein after the authoritative domain name resolver reads the local domain name server IP through the source IP of the packet of the second domain name resolution request, before the authoritative domain name server establishes the mapping relationship between the local domain name server IP and the public network gateway IP, the detecting method further comprises:
and the authoritative domain name resolver takes the unique request access identification as a key word and stores the local domain name server IP into a buffer.
8. The method according to claim 1, wherein the parsing, by the authoritative domain name resolver, the packet of the second domain name resolution request to obtain the detection server IP includes:
the authoritative domain name resolver resolves the message of the second domain name resolution request to obtain a domain name corresponding to the message of the second domain name resolution request;
and the authoritative domain name resolver compares whether the domain name suffix corresponding to the message of the second domain name resolution request is the same as the domain name suffix of the detection server, and if so, resolves the IP of the domain name corresponding to the message of the second domain name resolution request into the IP of the detection server.
9. The probing method according to claim 7, wherein before the packet responder returns the public network gateway IP and the local domain name server IP to the client according to the query request, the probing method further comprises:
and the message responder searches the buffer according to the unique request access identifier so as to obtain a public network gateway IP and a local domain name server IP corresponding to the unique request access identifier.
10. A detection system for a public network gateway IP and a local domain name server IP, the detection system comprising:
a client initiates a first domain name resolution request to a domain name corresponding to a detection server through a local domain name server to acquire an IP (Internet protocol) of the detection server; the detection server comprises a message responder and an authoritative domain name resolver;
the client sends a detection request message to the message responder, and the message responder acquires a public network gateway IP of the client according to a source IP of the detection request message;
the message responder generates a response message for the detection request message and returns the response message to the client;
after receiving the response message, the client reads the domain name in the response message; the client further initiates a second domain name resolution request to the domain name in the response message through the local domain name server so as to recurse the second domain name resolution request to the authoritative domain name resolver;
the authoritative domain name resolver reads the local domain name server IP through the source IP of the message of the second domain name resolution request;
the authoritative domain name server establishes a mapping relation between the local domain name server IP and the public network gateway IP;
the authoritative domain name resolver resolves the message of the second domain name resolution request to obtain the detection server IP, returns the detection server IP to the local domain name server, and returns the detection server IP to the client by the local domain name server;
the client sends a query request to the message responder according to the detection server IP so as to request the message responder to return the public network gateway IP and the local domain name server IP;
the message responder returns the public network gateway IP and the local domain name server IP to the client according to the query request;
and the client displays the public network gateway IP and the local domain name server IP.
CN202110423267.1A 2021-04-20 2021-04-20 Method and system for detecting public network gateway IP and local domain name server IP Pending CN112929466A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110423267.1A CN112929466A (en) 2021-04-20 2021-04-20 Method and system for detecting public network gateway IP and local domain name server IP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110423267.1A CN112929466A (en) 2021-04-20 2021-04-20 Method and system for detecting public network gateway IP and local domain name server IP

Publications (1)

Publication Number Publication Date
CN112929466A true CN112929466A (en) 2021-06-08

Family

ID=76174573

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110423267.1A Pending CN112929466A (en) 2021-04-20 2021-04-20 Method and system for detecting public network gateway IP and local domain name server IP

Country Status (1)

Country Link
CN (1) CN112929466A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115396397A (en) * 2022-04-13 2022-11-25 中国人民解放军国防科技大学 Method and device for determining service range of cache domain name system based on forwarding relation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959433A (en) * 2016-07-22 2016-09-21 无锡华云数据技术服务有限公司 Domain name resolution method and domain name resolution system
CN108702397A (en) * 2017-08-08 2018-10-23 深圳前海达闼云端智能科技有限公司 A kind of method and system obtained and collect client local dns server
CN111355819A (en) * 2018-12-24 2020-06-30 北京华为数字技术有限公司 Method for resolving domain name and network equipment
US20200220840A1 (en) * 2018-02-28 2020-07-09 Wangsu Science & Technology Co., Ltd. Method, server and system for resolving domain name
CN111447304A (en) * 2020-06-17 2020-07-24 中国人民解放军国防科技大学 Anycast node IP address enumeration method and system for anycast recursive domain name system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959433A (en) * 2016-07-22 2016-09-21 无锡华云数据技术服务有限公司 Domain name resolution method and domain name resolution system
CN108702397A (en) * 2017-08-08 2018-10-23 深圳前海达闼云端智能科技有限公司 A kind of method and system obtained and collect client local dns server
US20200220840A1 (en) * 2018-02-28 2020-07-09 Wangsu Science & Technology Co., Ltd. Method, server and system for resolving domain name
CN111355819A (en) * 2018-12-24 2020-06-30 北京华为数字技术有限公司 Method for resolving domain name and network equipment
CN111447304A (en) * 2020-06-17 2020-07-24 中国人民解放军国防科技大学 Anycast node IP address enumeration method and system for anycast recursive domain name system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
鄢萍等: "基于DDNS和NAT的服务器内外网动态映射", 《计算机工程》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115396397A (en) * 2022-04-13 2022-11-25 中国人民解放军国防科技大学 Method and device for determining service range of cache domain name system based on forwarding relation
CN115396397B (en) * 2022-04-13 2023-07-14 中国人民解放军国防科技大学 Method and device for determining service range of cache domain name system based on forwarding relation

Similar Documents

Publication Publication Date Title
CN104468860B (en) The recognition methods of domain name resolution server danger and device
US8694645B2 (en) Tracking web server
US8055751B2 (en) IP network management based on automatically acquired network entity status information
US9225731B2 (en) System for detecting the presence of rogue domain name service providers through passive monitoring
GB2582477A (en) Accessing gateway management console
KR101668272B1 (en) Characterizing unregistered domain names
CN108063833B (en) HTTP DNS analysis message processing method and device
CN108111548A (en) A kind of domain name system attack detection method, apparatus and system
CN105827599A (en) Cache infection detection method and apparatus based on deep analysis on DNS message
CN112804370A (en) Method and system for analyzing fraud websites
US8862667B2 (en) Network based audience measurement
CN112929466A (en) Method and system for detecting public network gateway IP and local domain name server IP
CN107040546B (en) Domain name hijacking detection and linkage handling method and system
CN111767481B (en) Access processing method, device, equipment and storage medium
CN112954043A (en) Method for identifying user based on website access log and computer equipment
JP3760362B2 (en) Server device
US20200184386A1 (en) Systems to resolve shipment delays
CN115150358B (en) Domain name acquisition method, electronic device and system
JP2002368781A (en) User location management domain name conversion system
CN116032886B (en) Data center and domain name switching method, device, equipment and medium
JP5588845B2 (en) Unauthorized domain detection device, unauthorized domain detection method, and program
CN104683497B (en) A kind of community network addressing of address method and device
US11144664B2 (en) Risk management support device
CN114722004A (en) Message retrieval method and device, electronic equipment and storage medium
JPH0730564A (en) Network system and method and device for detecting duplicate protocol address of network system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210608

WD01 Invention patent application deemed withdrawn after publication