DoT support method and system on DNS authoritative server
By generating an independent DoT service process outside the DNS authoritative server, the problem of intrusive modification and performance impact of traditional DNS servers when supporting DoT is solved, and flexible DoT support and performance satisfaction are achieved.
Patent Information
- Application Number
- CN202011524200.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-22
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-12-22
AI Technical Summary
Traditional DNS servers require intrusive modifications when supporting DoT, resulting in performance impacts, and TLS handshakes, loading, and unloading place high demands on DNS service performance.
By generating an independent DoT service process outside the DNS authoritative server, it is responsible for TLS handshake, loading and unloading, avoiding changes to the original DNS service system, and dynamically expanding support for TLS operations through a multi-process architecture.
It realizes non-intrusive and decoupled DoT support, avoids the performance impact on existing DNS servers, and meets the performance requirements of DoT.
Smart Images

Figure CN112667309B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet domain name, and in particular to a method for supporting DNS-over-TLS on a DNS authoritative server. Background Art
[0002] DoT (DNS-over-TLS) is a DNS request interaction based on TLS for message encryption. The full name of DoT is DNS over TLS. It uses the TLS protocol to transmit the DNS protocol. The TLS protocol is one of the most commonly used security encryption protocols on the Internet. The security basis for our access to HTTPs is based on the TLS protocol. Compared with the previous connectionless and unencrypted UDP mode, TLS itself has achieved confidentiality and integrity. The basic idea of the TLS protocol is certificate + encryption mechanism, which ensures security in two ways. The certificate is equivalent to applying for a legal ID card. When the client initiates a connection to the server, the two parties will verify each other's identity. The server gives the certificate to the client, and the client verifies the content and legitimacy of the certificate. Compared with DNSSEC, DoT focuses more on the encryption and confidentiality of DNS interactive connections. Although both standards encrypt DNS requests, DNS over TLS has some important differences from DNS over HTTPS. IETF defines DNS over HTTPS as RFC 8484 and DNS over TLS as RFC 7858 and RFC 8310.
[0003] When a client initiates a DNS domain name request based on TLS, a TCP connection is first established, and then a TLS handshake is performed to establish an encrypted connection. The TLS handshake uses an asymmetric encryption algorithm, and the symmetric encryption algorithm used to transmit data on the subsequent encrypted connection.
[0004] Traditional DNS servers need to be modified in an intrusive way to support DoT, that is, to make code changes based on the existing framework, which has an impact on the performance of the DNS server. In addition, TLS handshake, loading, and unloading also put forward higher requirements on the performance of DNS services. Summary of the invention
[0005] In view of the defects of the prior art, the purpose of the present invention is to provide a DoT support method and system on a DNS authoritative server. The method will not make intrusive modifications to the original DNS service system, and completes the TLS handshake, loading and unloading by generating a process independent of the existing DNS authoritative server.
[0006] The technical solution adopted by the present invention is as follows:
[0007] A method for supporting DoT (DNS-over-TLS) on a DNS authoritative server, comprising:
[0008] A DoT service process is set between the DNS authoritative server and the client. When the DoT service process receives a DoT request from the client, a TLS connection is established, and a process connection is established with the local DNS authoritative server.
[0009] Furthermore, after receiving the DoT request from the client, the DoT service process first performs SSL unloading, and transmits the unloaded data in plain text to the authoritative process of the local machine through the inter-process connection.
[0010] Furthermore, the DoT service process performs SSL loading on the plaintext response packet received from the local authoritative process and sends it to the client.
[0011] Furthermore, the DoT service process receives the DoT request sent by the client by monitoring port 853.
[0012] Furthermore, the DoT service process reads a local configuration file to obtain encryption keys in the DoT request, including a public key and a private key.
[0013] Furthermore, there are multiple DoT service processes, and each DoT service process serves one client.
[0014] Furthermore, the implementation of the DoT function is controlled by starting or shutting down the DoT service process.
[0015] Another aspect of the present invention further provides a DoT (DNS-over-TLS) support system on a DNS authoritative server, the system comprising:
[0016] The DoT service process module is arranged between the DNS authoritative server and the client, wherein the DoT service process module receives the DoT request sent by the client, establishes a TLS connection, and establishes a process connection with the local DNS authoritative server.
[0017] Furthermore, the DoT service process module includes an SSL unloading module and an SSL loading module, wherein:
[0018] The SSL offloading module first decrypts the DoT request sent from the client, and transmits the decrypted data in plain text to the authoritative process of the local machine through the inter-process connection;
[0019] The SSL loading module encrypts the plain text response packet received from the local authoritative process and then sends it to the client.
[0020] Furthermore, it also includes a control module, which controls the startup and shutdown of the DoT service process module, or the increase and decrease of the DoT service process module.
[0021] Compared with the prior art, the method for supporting DNS-over-TLS on a DNS authoritative server provided by the present invention achieves the following technical effects:
[0022] 1. The present invention deploys the DoT service process on the basis of the existing DNS authoritative server in a non-invasive and decoupled manner. This deployment method is flexible and has no changes or impacts on the existing DNS authoritative server.
[0023] 2. The present invention supports TLS loading and unloading in a multi-process manner and can be dynamically expanded to meet the performance requirements of DoT. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flow diagram of the DoT support method on the DNS authoritative server in an embodiment of the present invention.
[0025] Figure 2 It is an architecture diagram of the DoT support system on the DNS authoritative server in an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are preferred implementation methods of the present invention, and the description is for the purpose of illustrating the general principles of the present invention, and is not intended to limit the scope of the present invention. The scope of protection of the present invention shall be based on the claims, and all other embodiments obtained by ordinary technicians in this field without creative work based on the embodiments of the present invention shall fall within the scope of protection of the present invention.
[0027] The purpose of the present invention is to provide a method for supporting DoT on a DNS authoritative server. The method does not make intrusive modifications to the existing DNS authoritative server system, does not require any changes to the original DNS service, and supports DoT in a decoupled manner from the original DNS service.
[0028] This embodiment provides a DoT (DNS-over-TLS) support method on a DNS authoritative server, the method comprising:
[0029] A DoT service process (also called DoTd, DoT daemon) is set between the DNS authoritative server and the client. When the DoT service process receives a DoT request from the client, it establishes a TLS connection and a process connection with the local DNS authoritative server.
[0030] Specifically, when the DoT service process receives the DoT request from the client, it first performs SSL unloading, that is, decrypts the content, and transmits the unloaded data, that is, the decrypted data, to the authoritative process of the local machine in plain text.
[0031] When the DoT service process receives a plaintext response packet from the local authoritative process, it first performs SSL loading, that is, encrypts the content, and then sends it to the client.
[0032] Among them, the DoT service process in the present invention is preferably multiple, each DoT service process serves one client, the DoT service process can be increased or decreased, and the implementation of the DoT function is controlled by starting or shutting down the DoT service process, thereby achieving decoupling operation from the existing DNS authoritative server.
[0033] Based on the existing authoritative server system architecture, the present invention generates a DoT service process independent of the existing DNS authority. The DoT service process is responsible for processing the business logic of SSL, mainly including completing the handshake connection, loading, and unloading with TLS, decoupling the performance-consuming TLS-related operations from the existing DNS authoritative server, without making any changes to the original DNS service, thereby improving the overall performance of the server.
[0034] Mate Reference Figure 1 As shown, the following is a complete description of the process of the DNS-over-TLS support method on the DNS authoritative server in an embodiment of the present invention.
[0035] 1. The original DNS authoritative server additionally listens to the local loopback address 127.0.0.1, which represents the local virtual interface of the device. By default, it is considered to be an interface that will never go down, such as TCP port 54, which is used for communication with the DoT service process. Of course, it can also be configured to any other available port to achieve communication between the authoritative process and the DoT service process.
[0036] 2. Use a multi-process architecture, that is, start multiple DoT service processes (DoTd) to listen to port 853 (RFC7858) at the same time and receive DoT requests sent by the client. Through TLS encryption and identity authentication, DNS over TLS uses TCP as the basic connection protocol, and DNS overTLS has its own port 853.
[0037] 3. The DoT service process reads the configuration file to obtain the encryption key in the request content, including the private key and the public key.
[0038] 4. The DoT service process (DoTd) uses the encryption key to establish a TLS connection with the client, and then establishes a TCP connection with the local DNS authoritative server.
[0039] 5. After the DoT service process establishes a connection with the front-end and back-end, that is, the client and the local DNS authoritative server, each time data is received from the client, SSL is first unloaded, which is equivalent to decryption, and then the plaintext data after unloading is sent to the local DNS authoritative server.
[0040] 6. The local DNS authoritative server processes the DNS request of the TCP protocol normally and sends a response packet.
[0041] 7. The DoTd service process receives the plaintext response packet from the local DNS authoritative server and loads the data with SSL, that is, encrypts the data and sends it to the client.
[0042] like Figure 1 As shown, client 1 is a hypothetical original TCP request, and communication is established between it and the DNS authoritative server through UDP / TCP53 port. Client 2 / 3 is coupled with an independent DoTd process, and client 2 / 3 requests port 853. The DoTd service process receives the request, establishes a TLS connection, and establishes an inter-process connection with the authoritative process of the local machine. The DoTd service process decrypts the encrypted request received from the client side and transmits the plaintext to the authoritative process of the local machine through the inter-process connection. At the same time, the plaintext response packet received from the authoritative service process of the local machine is encrypted and sent to client 2 / 3. Compared with the original intrusive code modification, that is, embedding the DoT function logic into the original code, and requiring the modification of the overall code architecture, the present invention adopts a non-intrusive method, that is, no changes are made to the code of the original authoritative server, and the support of the newly added DoT function is completely decoupled from the original authoritative service. Moreover, by adding more independent DoTd processes (multiple processes), the support of the DoT function can be achieved by starting and shutting down the DoT service process.
[0043] Another embodiment of the present invention further provides a DoT (DNS-over-TLS) support system on a DNS authoritative server, the system comprising:
[0044] The DoT service process module is arranged between the DNS authoritative server and the client, wherein the DoT service process module receives the DoT request sent by the client, establishes a TLS connection, and establishes a process connection with the local DNS authoritative server.
[0045] Specifically, the DoT service process module includes an SSL unloading module and an SSL loading module, wherein:
[0046] The SSL offloading module first decrypts the DoT request sent from the client, and transmits the decrypted data in plain text to the authoritative process of the local machine through the inter-process connection;
[0047] The SSL loading module encrypts the plaintext response packet received from the local authoritative process and sends it to the client.
[0048] The system also includes a control module, which controls the startup and shutdown of the DoT service process module, or the increase and decrease of the DoT service process module.
[0049] The present invention supports DoT on the basis of the existing DNS authoritative server in a decoupled manner, with flexible deployment and no modification or impact on the existing DNS authoritative server. It supports TLS loading and unloading in a multi-process manner, can be dynamically expanded, and meets the performance requirements of DoT.
[0050] The above description shows and describes several preferred embodiments of the present invention, but as mentioned above, it should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the invention concept described herein through the above teachings or the technology or knowledge of the relevant field. Changes and variations made by those skilled in the art do not depart from the spirit and scope of the present invention, and should be within the scope of protection of the claims attached to the present invention.
Claims
1. A DoT support method on a DNS authoritative server, characterized in that: The method comprises: setting a DoT service process between a DNS authoritative server and a client, and when the DoT service process receives a DoT request sent by the client, establishing a TLS connection and establishing a process connection with the local DNS authoritative server; After receiving the DoT request from the client, the DoT service process first performs SSL unloading, and transmits the unloaded data to the authoritative process of the local machine in plain text; The DoT service process performs SSL loading on the plaintext response packet received from the local authoritative process and sends it to the client.
2. The method according to claim 1, characterized in that: The DoT service process listens to port 853 to receive the DoT request sent by the client.
3. The method according to claim 1 or 2, characterized in that: The DoT service process reads a local configuration file to obtain the encryption key in the DoT request, including a public key and a private key.
4. The method according to claim 1, characterized in that There are multiple DoT service processes, and each DoT service process serves one client.
5. The method according to claim 1, characterized in that The implementation of the DoT function is controlled by starting or shutting down the DoT service process.
6. A DoT support system on a DNS authoritative server, characterized in that: The system includes: a DoT service process module, which is arranged between the DNS authoritative server and the client, and is used to receive the DoT request sent by the client, establish a TLS connection, and establish a process connection with the local DNS authoritative server; The DoT service process module includes an SSL unloading module and an SSL loading module; The SSL offloading module is used to first decrypt the DoT request sent from the client, and transmit the decrypted data in plain text to the authoritative process of the local machine through the inter-process connection; The SSL loading module is used to encrypt the plain text response packet received from the local authoritative process and then send it to the client.
7. The system according to claim 6, characterized in that The system also includes a control module, which controls the startup and shutdown of the DoT service process module, or the increase and decrease of the DoT service process module.
Citation Information
Patent Citations
Method for hiding DNS domain name of server accessed by mobile phone APP
CN111262881A
Method for realizing recursive encryption transmission based on DOT and recursive server
CN116155614A
