User-based domain name resolution method and system

By introducing customized DNS into the intelligent DNS system and responding to different parsing results based on user IDs and control policies, the problem that the existing DNS system cannot achieve user-level policy control is solved, and flexible parsing control for different users is achieved.

CN118921351BActive Publication Date: 2025-01-21BEIJING CAPITEK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411406367.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-21
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

The existing intelligent DNS system cannot implement user-based policy control. The domain name resolution results of all users in the same IP address segment are the same, and it cannot respond to different resolution results of different users.

Method used

By introducing a customized DNS between the NAS and AAA systems, the user ID is obtained and correspondingly related to the terminal IP address. After receiving the domain name resolution request, the customized DNS executes a response based on the user ID and control policy, and returns different resolution results.

Benefits of technology

It realizes the control of the response of domain name resolution results according to different user policies, meets the business needs of specific scenarios, and solves the problem that the existing DNS system cannot implement user-level policy control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921351B_ABST
    Figure CN118921351B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of communications, and aims to solve the problem that different users need DNS to resolve different IPs when accessing the same domain name. The present invention proposes a user-based domain name resolution method and system, and the method includes: when a terminal accesses the network, NAS sends a billing start message to AAA, AAA resolves the billing start message to obtain a user ID and a terminal IP address, and notifies a customized DNS to locally add a mapping relationship between the user ID and the terminal IP; when the customized DNS receives a new domain name management request, it adds a corresponding relationship between the user ID, domain name, IP address and control policy; when the terminal accesses the domain name, it sends a domain name resolution request to the customized DNS, and the customized DNS obtains the user ID according to the terminal IP, and then obtains and executes the corresponding control policy according to the user ID and the domain name, and returns the response result to the terminal. The present invention achieves different users accessing the same domain name to resolve different resolution results and execute corresponding responses by associating the terminal IP, user ID and domain name resolution control policy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a user-based domain name resolution method and system. Background Art

[0002] In the existing field of communication technology, DNS (Domain Name System) domain name resolution technology is widely used on the Internet. Its original purpose was to simplify users' access to the Internet by replacing difficult-to-remember IP (Internet Protocol) addresses with simple and easy-to-recognize domain names, allowing users to access the Internet more conveniently.

[0003] With the development of Internet business, some application scenarios have posed challenges to DNS domain name resolution. In the user private network access scenario, different users will access the same domain name, and DNS is required to resolve different IP addresses. In the user Internet access control scenario, when different users access the same domain name, DNS is required to control whether to return the IP address corresponding to the domain name to the user terminal. Existing intelligent DNS systems are usually implemented based on IP address segments. In the same IP address segment, the domain name resolution results of all users are the same, and user-based policy control cannot be implemented. Therefore, in order to achieve different resolution results for different users and implement user-level policy control, it is urgent to propose an effective method to resolve the domain names of different users and respond to different resolution results according to policy control. Summary of the invention

[0004] The present invention aims to provide a user-based domain name resolution solution to solve the deficiencies of the prior art in practical application scenarios. The technical problem to be solved by the present invention is achieved through the following technical solution.

[0005] To solve the above problem, the first aspect of the present invention provides a method for domain name resolution based on a user, the method comprising: a NAS (Network Access Server) obtains a user ID (Identity The terminal sends a user ID and a terminal IP address to the AAA (Authentication, Authorization, Accounting) server, and after the AAA returns an identity confirmation message, the terminal is assigned a terminal IP address, and billing start information is sent to the AAA. The AAA parses the billing start information to obtain the user ID and the terminal IP address, and calls the interface of the customized DNS to add a corresponding relationship between the user ID and the terminal IP address locally in the customized DNS. When the customized DNS receives a request for adding a domain name management, it adds and stores domain name related information, wherein the domain name related information includes the user ID, the domain name, the IP address corresponding to the domain name, and the control policy, and there is a unique corresponding relationship between the user ID, the domain name, the IP address, and the control policy. When the terminal accesses the domain name, it sends a domain name resolution request to the customized DNS. The customized DNS queries the user ID according to the terminal IP address, obtains the corresponding control policy according to the user ID and the domain name, executes a corresponding response according to the control policy, and returns different response results to the terminal.

[0006] Preferably, the method also includes: the NAS sends authorization end information to the AAA when the terminal disconnects from the network, the AAA parses the authorization end information to obtain the user ID and the terminal IP address, and calls the interface of the customized DNS to locally delete the correspondence between the user ID and the terminal IP address in the customized DNS.

[0007] Preferably, the method further includes: when the customized DNS receives the domain name deletion management request, deleting the domain name related information according to the domain name; or when the customized DNS receives the domain name deletion management request, deleting the domain name related information according to the domain name and the user ID.

[0008] Preferably, the method also includes: if the terminal accesses the domain name, the domain name resolution request is sent to the customized DNS through NAT (Network Address Translation), the NAT converts the terminal IP address to obtain a converted IP address, and then sends the terminal IP address and the converted IP address to the customized DNS through a synchronization port, after receiving the domain name resolution request, the customized DNS obtains the terminal IP address according to the converted IP address and the synchronization port, and then queries the user ID according to the terminal IP address.

[0009] Preferably, the NAT sends the terminal IP address and the conversion IP address to the customized DNS through the synchronization port, including: if the NAT is a dynamic NAT, the dynamic NAT synchronizes the terminal IP address of the terminal with the customized DNS through a syslog message; if the NAT is a static NAT, the static NAT imports the mapping relationship between the terminal IP address and the conversion IP address to the customized DNS, and converts the terminal IP address into the conversion IP address.

[0010] Preferably, if the control policy is a local response, the customized DNS returns the user ID and the IP address corresponding to the domain name to the terminal; if the control policy is a proxy response, the customized DNS sends a recursive query instruction to a third-party DNS, and the third-party DNS obtains the IP address based on the domain name and returns the IP address to the terminal; if the control policy is to prohibit access, the customized DNS returns a response resolution failure instruction to the terminal.

[0011] Preferably, the method also includes: if the customized DNS cannot query the user ID according to the terminal IP address, the customized DNS returns the response resolution failure instruction to the terminal or sends the recursive query instruction to the third-party DNS, and the third-party DNS queries the IP address and returns it to the terminal; if the customized DNS cannot query the management policy according to the user ID and the domain name, the customized DNS returns the response resolution failure instruction to the terminal or sends the recursive query instruction to the third-party DNS, and the third-party DNS queries the IP address and returns it to the terminal.

[0012] According to another aspect of the present invention, the present invention also proposes a user-based domain name resolution system, the system comprising: a data synchronization module, used for NAS to obtain a user ID when a terminal accesses a network, confirm the terminal identity to AAA, and after the AAA returns an identity confirmation message, allocate a terminal IP address to the terminal, and send billing start information to the AAA, the AAA parses the billing start information to obtain the user ID and the terminal IP address, and calls the interface of the customized DNS to add a corresponding relationship between the user ID and the terminal IP address locally in the customized DNS; a domain name management module, used for the customized DNS to add and store domain name related information when receiving a new domain name management request, wherein the domain name related information includes the user ID, the domain name, the IP address corresponding to the domain name and the control policy, and the user ID, the domain name, the IP address and the control policy have a unique correspondence; a domain name resolution module, used for the terminal to send a domain name resolution request to the customized DNS when accessing the domain name, the customized DNS queries the user ID according to the terminal IP address, and obtains the corresponding control policy according to the user ID and the domain name, executes a corresponding response according to the control policy, and returns different response results to the terminal.

[0013] Preferably, the domain name resolution module includes: an information resolution unit, which is used to send a domain name resolution request to the customized DNS when the terminal accesses the domain name, and the DNS queries the user ID according to the correspondence between the user ID and the terminal IP address; a policy control unit, which is used for the customized DNS to obtain the corresponding control policy using the user ID and the domain name according to the unique correspondence between the user ID, the domain name, the IP address and the control policy; a response execution unit, which is used for the customized DNS to execute a corresponding response according to the obtained control policy, and return different response results to the terminal.

[0014] Preferably, if the control policy is a local response, the customized DNS returns the user ID and the IP address corresponding to the domain name to the terminal; if the control policy is a proxy response, the customized DNS sends a recursive query instruction to a third-party DNS, and the third-party DNS obtains the IP address based on the domain name and returns the IP address to the terminal; if the control policy is to prohibit access, the customized DNS returns a response resolution failure instruction to the terminal.

[0015] The embodiments of the present invention include the following advantages:

[0016] The present invention proposes a user-based domain name resolution method and system, which solves the problem that in the existing intelligent DNS system, all users have the same domain name resolution results for the same IP address segment, and user-based policy control cannot be implemented. The present invention can respond to different domain name resolution results to meet the business needs of certain specific scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is the networking diagram of the customized DNS system;

[0018] Figure 2 It is a flowchart of a method embodiment of a user-based domain name resolution method of the present invention;

[0019] Figure 3 It is a user synchronization schematic diagram of an embodiment of a user-based domain name resolution method of the present invention;

[0020] Figure 4 It is a domain name management schematic diagram of an embodiment of a user-based domain name resolution method of the present invention;

[0021] Figure 5 This is a schematic diagram of domain name resolution according to an embodiment of a user-based domain name resolution method of the present invention;

[0022] Figure 6 It is a structural schematic diagram of an embodiment of a user-based domain name resolution system of the present invention. DETAILED DESCRIPTION

[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0024] It should be noted that the above detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the present application belongs.

[0025] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should also be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0026] In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or inherent to these processes, methods, products, or apparatuses.

[0027] Figure 1 This is a network diagram of a customized DNS system. Figure 1 As shown, the terminal accesses the NAS device through the network, and sends the domain name to be queried to the customized DNS system through the NAS device. The NAS device is interconnected with the AAA system network, and the AAA verifies the identity of the terminal. The AAA system is interconnected with the customized DNS system network to synchronize user data including user ID and terminal IP address. The terminal communicates with the customized DNS network through the NAS device to achieve user-based domain name resolution. The customized DNS network is connected to other DNS networks to achieve recursive domain name resolution. The NAS device is interconnected with the application system network, and the terminal accesses the application system through the NAS device.

[0028] In the user private network access scenario, different users will access the same domain name, which requires DNS to resolve different IP addresses, and also requires DNS to control whether to return the IP address corresponding to the domain name. However, the existing intelligent DNS system is usually implemented based on IP address segments. Within the same IP address, the domain name resolution results of all users are the same, and user-level policy control cannot be implemented.

[0029] In view of the problem that the DNS system in the current scenario needs to return different IP addresses based on user resolution of the same domain name, the present invention proposes a user-based domain name resolution method to respond to different resolution results for different users and implement user-level policy control.

[0030] Figure 2 This is a flowchart of a method for domain name resolution based on a user according to an embodiment of the present invention. Figure 2 Describe the specific steps for performing domain name resolution based on users.

[0031] Step S210: NAS obtains the user ID when the terminal accesses the network, confirms the terminal identity with AAA, allocates a terminal IP address to the terminal after AAA returns the identity confirmation message, and sends billing start information to AAA. AAA parses the billing start information to obtain the user ID and the terminal IP address, and calls the interface of the customized DNS to add the corresponding relationship between the user ID and the terminal IP address in the customized DNS.

[0032] Step S220: When the customized DNS receives a request for adding domain name information, it adds and stores domain name related information, where the domain name related information includes the user ID, domain name, IP address corresponding to the domain name, and management policy. There is a unique correspondence between the user ID, domain name, IP address, and management policy.

[0033] Step S230: When the terminal accesses the domain name, the domain name resolution request is sent to the customized DNS. The customized DNS queries the user ID according to the terminal IP address, obtains the corresponding management and control policy according to the user ID and domain name, executes the corresponding response according to the management and control policy, and returns different response results to the terminal.

[0034] To implement user-based domain name resolution, specifically, Figure 3 This is a user synchronization diagram of an embodiment of a domain name resolution method based on a user of the present invention. The following will illustrate, in two embodiments, that AAA calls a data synchronization (addition) interface of a customized DNS when a terminal is online, and that AAA calls a data synchronization (deletion) interface of a customized DNS when a terminal is offline.

[0035] Embodiment 1: When the terminal goes online, as shown in step S210, NAS obtains the user ID when the terminal accesses the network, confirms the terminal identity with AAA, allocates a terminal IP address to the terminal after AAA returns the identity confirmation message, and sends billing start information to AAA. AAA parses the billing start information to obtain the user ID and the terminal IP address, and calls the interface of the customized DNS to add the corresponding relationship between the user ID and the terminal IP address in the customized DNS locally;

[0036] Embodiment 2: When the terminal goes offline, NAS sends authorization end information to AAA when the terminal is disconnected from the network. AAA parses the authorization end information to obtain the user ID and the terminal IP address, and calls the interface of the customized DNS to delete the corresponding relationship between the user ID and the terminal IP address locally in the customized DNS.

[0037] After the customized DNS determines the correspondence between the user ID and the terminal IP address or the customized DNS deletes the correspondence between the user ID and the terminal IP address, specifically, Figure 4 This is a domain name management schematic diagram of an embodiment of a domain name resolution method based on a user of the present invention. The following will illustrate in three embodiments that after receiving a domain name management request, a customized DNS adds or deletes a domain name management request, and adds user-based domain name related information according to the added domain name management request or deletes user-based domain name related information according to the deleted domain name management request.

[0038] Embodiment 3: When the customized DNS receives a request for management of a new domain name, such as step S220, when the customized DNS receives a request for information of a new domain name, it adds and stores domain name related information, wherein the domain name related information includes the user ID, the domain name, the IP address corresponding to the domain name, and the management and control policy, and there is a unique correspondence between the user ID, the domain name, the IP address, and the management and control policy.

[0039] Embodiment 4: When the customized DNS receives a domain name deletion management request, the domain name related information is deleted according to the domain name.

[0040] Embodiment 5: When the customized DNS receives a domain name deletion management request, unlike Embodiment 4, when it is impossible to delete domain name related information based on the domain name only, the domain name related information is deleted based on the domain name and the user ID.

[0041] After the customized DNS stores the domain name related information or deletes the domain name related information, the domain name resolution based on the user is realized. The specific process of the customized DNS querying the user ID is described below with two embodiments. Figure 5 The present invention is a domain name resolution schematic diagram of a user-based domain name resolution method embodiment.

[0042] Example 6: Figure 5 As shown, when a terminal accesses a domain name, it sends a domain name resolution request to a customized DNS, and the customized DNS queries the user ID according to the terminal IP address.

[0043] Example 7: Different from Example 6, Example 7 installs NAT between the terminal and the customized DNS. When the terminal accesses a domain name, the domain name resolution request is sent to the customized DNS through NAT. The NAT converts the terminal IP address to obtain a converted IP address, and then sends the terminal IP address and the converted IP address to the customized DNS through the synchronization port. After receiving the domain name resolution request, the customized DNS obtains the terminal IP address based on the converted IP address and the synchronization port, and then queries the user ID based on the terminal IP address.

[0044] In Example 7, NAT converts the terminal IP address to obtain a converted IP address, and then sends the terminal IP address and the converted IP address to the customized DNS through the synchronization port, which respectively includes two cases where NAT is dynamic NAT and static NAT. The following will use two embodiments to illustrate the two ways in which NAT synchronizes the terminal IP address and the converted IP address to the customized DNS when NAT is in these two cases.

[0045] Embodiment 8: If NAT is dynamic NAT, dynamic NAT synchronizes the terminal IP address of the terminal with the customized DNS through syslog messages.

[0046] Embodiment 9: If NAT is static NAT, static NAT imports the mapping relationship between the terminal IP address and the conversion IP address into the customized DNS, and converts the terminal IP address into the conversion IP address.

[0047] like Figure 5 As shown, after querying the user ID, the customized DNS obtains the corresponding control policy according to the user ID and domain name, executes the corresponding response according to the control policy, and returns different response results to the terminal. Specifically, the control policy can represent multiple responses. The following will illustrate in three embodiments that the customized DNS executes corresponding different responses when the control policy is different.

[0048] Embodiment 10: If the control policy is a local response, the customized DNS returns the IP address corresponding to the user ID and the domain name to the terminal.

[0049] Embodiment 11: If the control policy is proxy response, the customized DNS sends a recursive query instruction to the third-party DNS, and the third-party DNS obtains the IP address according to the domain name and returns the IP address to the terminal.

[0050] Embodiment 12: If the control policy is to prohibit access, the customized DNS will return a response resolution failure instruction to the terminal.

[0051] If the customized DNS cannot query the user ID, the customized DNS will return a response resolution failure instruction to the terminal or send a recursive query instruction to the third-party DNS, which will query the IP address and return it to the terminal. In the process of the customized DNS querying the user ID, the customized DNS first queries the user ID according to the terminal IP address. The following will illustrate two situations in which the customized DNS queries the user ID in two embodiments.

[0052] Embodiment 13: If the customized DNS cannot query the user ID according to the terminal IP address, the customized DNS returns a resolution failure response instruction to the terminal or sends a recursive query instruction to the third-party DNS, and the third-party DNS queries the IP address and returns it to the terminal.

[0053] Example 14: Different from Example 13, if the customized DNS can query the user ID based on the terminal IP address, but cannot query the IP address corresponding to the management policy and domain name based on the user ID and domain name, the customized DNS returns a resolution failure response instruction to the terminal or sends a recursive query instruction to the third-party DNS, and the third-party DNS queries the IP address and returns it to the terminal.

[0054] After explaining the specific steps of user-based domain name resolution, take the 5G network as an example, and use SMF (Session Management Function) as NAS to confirm the terminal identity to AAA. When different users access the same domain name, different IP addresses will be returned. The following four embodiments illustrate the implementation process of user-based domain name resolution in the form of four different user IDs accessing the same domain name.

[0055] Example 15: After the terminal with user ID 188****3301 accesses the network, SMF obtains the user ID, confirms the terminal identity with AAA, and allocates a terminal IP address of 18.0.0.101 to the terminal. Then AAA sends the billing start information to the customized DNS through the data synchronization interface. The billing start information includes the user ID and the terminal IP address. The customized DNS determines the correspondence between the user ID and the terminal IP address. When the customized DNS receives a request for adding a domain name management, it adds and stores domain name related information, wherein the domain name related information includes the user ID, domain name, IP address corresponding to the domain name, and control policy. The user ID, domain name, IP address, and control policy have a unique correspondence. When the terminal accesses the domain name www.itest.com, the domain name resolution request is sent to the customized DNS. The customized DNS queries the user ID 188****3301 based on the terminal IP address 18.0.0.101, and obtains the corresponding management and control policy as a local response based on the user ID and domain name. According to the local response, the IP address corresponding to the domain name is 10.0.0.1, and then the customized DNS returns the user ID and the corresponding IP address to the terminal.

[0056] Example 16: After the terminal with user ID 188****3302 accesses the network, SMF obtains the user ID, confirms the terminal identity with AAA, and allocates a terminal IP address of 18.0.0.102 to the terminal. Then AAA sends the billing start information to the customized DNS through the data synchronization interface. The billing start information includes the user ID and the terminal IP address. The customized DNS determines the correspondence between the user ID and the terminal IP address. When the customized DNS receives a request for adding a domain name management, it adds and stores domain name related information, wherein the domain name related information includes the user ID, domain name, IP address corresponding to the domain name, and control policy. The user ID, domain name, IP address, and control policy have a unique correspondence. When the terminal accesses the domain name www.itest.com, the domain name resolution request is sent to the customized DNS. The customized DNS queries the user ID 188****3302 based on the terminal IP address 18.0.0.102, and obtains the corresponding management and control policy as a local response based on the user ID and domain name. According to the local response, the IP address corresponding to the domain name is 10.0.0.2, and then the customized DNS returns the user ID and the corresponding IP address to the terminal.

[0057] It can be seen from Example 15 and Example 16 that when different users access the same domain name and correspond to the same management and control policies, the IP addresses returned to the terminal are also different.

[0058] Example 17: After the terminal with user ID 188****3303 accesses the network, SMF obtains the user ID, confirms the terminal identity with AAA, and allocates a terminal IP address of 18.0.0.103 to the terminal. Then AAA sends the billing start information to the customized DNS through the data synchronization interface. The billing start information includes the user ID and the terminal IP address. The customized DNS determines the correspondence between the user ID and the terminal IP address. When the customized DNS receives a request for adding a domain name management, it adds and stores domain name related information, wherein the domain name related information includes the user ID, domain name, IP address corresponding to the domain name, and control policy. The user ID, domain name, IP address, and control policy have a unique correspondence. When the terminal accesses the domain name www.itest.com, the domain name resolution request is sent to the customized DNS. The customized DNS queries the user ID 188****3303 based on the terminal IP address 18.0.0.103, and obtains the corresponding management and control policy as a proxy response based on the user ID and domain name. The customized DNS sends a recursive query instruction to the third-party DNS, and the third-party DNS obtains the IP address based on the user ID 188****3303 and the domain name www.itest.com, and returns the IP address to the terminal.

[0059] Example 18: After the terminal with user ID 188****3304 accesses the network, SMF obtains the user ID, confirms the terminal identity with AAA, and allocates a terminal IP address of 18.0.0.104 to the terminal. Then AAA sends the billing start information to the customized DNS through the data synchronization interface. The billing start information includes the user ID and the terminal IP address. The customized DNS determines the correspondence between the user ID and the terminal IP address. When the customized DNS receives a request for adding a domain name management, it adds and stores domain name related information, wherein the domain name related information includes the user ID, domain name, IP address corresponding to the domain name, and control policy. The user ID, domain name, IP address, and control policy have a unique correspondence. When the terminal accesses the www.itest.com domain name, the domain name resolution request is sent to the customized DNS. The customized DNS queries the user ID 188****3304 based on the terminal IP address 18.0.0.104, and obtains the corresponding control policy of prohibiting access based on the user ID and domain name. The customized DNS returns a response resolution failure instruction to the terminal.

[0060] It can be seen from Example 17 and Example 18 that when different users access the same domain name, different control policies are obtained. Customized DNS achieves different domain name resolution results according to different control policies.

[0061] Figure 6 FIG. 1 is a schematic diagram of a user-based domain name resolution system embodiment of the present invention. Figure 6 As shown, the system for implementing domain name resolution based on users includes: a data synchronization module 10, a domain name management module 20 and a domain name resolution module 30. The data synchronization module 10 is used for NAS to obtain the user ID when the terminal accesses the network, confirm the terminal identity to AAA, allocate the terminal IP address to the terminal after AAA returns the identity confirmation message, and send the billing start information to AAA. AAA resolves the billing start information to obtain the user ID and the terminal IP address, and calls the interface of the customized DNS to add the corresponding relationship between the user ID and the terminal IP address in the customized DNS locally; the domain name management module 20 is used for the customized DNS to add and store domain name related information when receiving the newly added domain name management request, wherein the domain name related information includes the user ID, the domain name, the IP address corresponding to the domain name and the control policy, and the user ID, the domain name, the IP address and the control policy have a unique corresponding relationship. The domain name resolution module 30 is used to send the domain name resolution request to the customized DNS when the terminal accesses the domain name, and the customized DNS queries the user ID according to the terminal IP address, obtains the corresponding control policy according to the user ID and the domain name, executes the corresponding response according to the control policy, and returns different response results to the terminal.

[0062] Specifically, the domain name resolution module 30 includes an information resolution unit 31, a policy control unit 32 and a response execution unit 33. The information resolution unit 31 is used to send a domain name resolution request to a customized DNS when a terminal accesses a domain name, and the customized DNS queries the user ID according to the correspondence between the user ID and the terminal IP address. The policy control unit 32 is used for the customized DNS to obtain the corresponding control policy using the user ID and the domain name according to the unique correspondence between the user ID, domain name, IP address and control policy. The response execution unit 33 is used for the customized DNS to execute the corresponding response according to the obtained control policy, and return different response results to the terminal.

[0063] If the control policy is local response, the customized DNS returns the IP address corresponding to the user ID and domain name to the terminal; if the control policy is proxy response, the customized DNS sends a recursive query instruction to the third-party DNS, and the third-party DNS obtains the IP address based on the domain name and returns the IP address to the terminal; if the control policy is to deny access, the customized DNS returns a response resolution failure instruction to the terminal.

[0064] The remaining steps of the above-mentioned user-based domain name resolution system structure embodiment provided by the present invention are the same as those of the user-based domain name resolution method embodiment provided by the present invention, and their repeated description is omitted here.

[0065] The present invention relates to a user-based domain name resolution method and system, which solves the problem that in the existing intelligent DNS system, all users have the same domain name resolution results for the same IP address segment, and user-based policy control cannot be implemented. The present invention can respond to different domain name resolution results to meet the business needs of certain specific scenarios.

[0066] In the above detailed description, reference is made to the accompanying drawings, which form a part of this document. In the accompanying drawings, similar symbols typically identify similar components unless the context indicates otherwise. The illustrated embodiments described in the detailed description, drawings, and claims are not meant to be limiting. Other embodiments may be used, and other changes may be made, without departing from the spirit or scope of the subject matter presented herein.

[0067] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A user-based domain name resolution method, characterized in that: The method comprises: When the terminal accesses the network, the NAS obtains the user ID, confirms the terminal identity with the AAA, and after the AAA returns the identity confirmation message, allocates the terminal IP address to the terminal, and sends the billing start information to the AAA, and the AAA parses the billing start information to obtain the user ID and the terminal IP address, and calls the interface of the customized DNS to add the corresponding relationship between the user ID and the terminal IP address locally in the customized DNS; when the terminal disconnects from the network, the NAS sends the authorization end information to the AAA, and the AAA parses the authorization end information to obtain the user ID and the terminal IP address, and calls the interface of the customized DNS to delete the corresponding relationship between the user ID and the terminal IP address locally in the customized DNS; When the customized DNS receives a new domain name management request, it adds and stores domain name related information, wherein the domain name related information includes the user ID, domain name, IP address corresponding to the domain name and control policy, and there is a unique correspondence between the user ID, the domain name, the IP address and the control policy; When the terminal accesses the domain name, the domain name resolution request is sent to the customized DNS. The customized DNS queries the user ID according to the terminal IP address, obtains the corresponding control policy according to the user ID and the domain name, executes the corresponding response according to the control policy, and returns different response results to the terminal; if the control policy is a local response, the customized DNS returns the user ID and the IP address corresponding to the domain name to the terminal; if the control policy is a proxy response, the customized DNS sends a recursive query instruction to the third-party DNS, and the third-party DNS obtains the IP address according to the domain name and returns the IP address to the terminal; If the control policy is to prohibit access, the customized DNS will return a response resolution failure instruction to the terminal; if the customized DNS cannot query the user ID according to the terminal IP address, the customized DNS returns the response resolution failure instruction to the terminal or sends the recursive query instruction to the third-party DNS, and the third-party DNS queries the IP address and returns it to the terminal; if the customized DNS cannot query the control policy according to the user ID and the domain name, the customized DNS returns the response resolution failure instruction to the terminal or sends the recursive query instruction to the third-party DNS, and the third-party DNS queries the IP address and returns it to the terminal.

2. The method according to claim 1, characterized in that The method further comprises: When the customized DNS receives a domain name deletion management request, it deletes the domain name related information according to the domain name; Or when the customized DNS receives the domain name deletion management request, it deletes the domain name related information according to the domain name and the user ID.

3. The method according to claim 1, characterized in that The method further comprises: If the terminal accesses the domain name, the domain name resolution request is sent to the customized DNS through NAT, the NAT converts the terminal IP address to obtain a converted IP address, and then sends the terminal IP address and the converted IP address to the customized DNS through the synchronization port. After receiving the domain name resolution request, the customized DNS obtains the terminal IP address according to the converted IP address and the synchronization port, and then queries the user ID according to the terminal IP address.

4. The method according to claim 3, characterized in that The NAT sending the terminal IP address and the converted IP address to the customized DNS through a synchronization port includes: If the NAT is a dynamic NAT, the dynamic NAT synchronizes the terminal IP address of the terminal with the custom DNS through a syslog message; If the NAT is a static NAT, the static NAT imports the mapping relationship between the terminal IP address and the conversion IP address into the custom DNS, and converts the terminal IP address into the conversion IP address.

5. A user-based domain name resolution system, characterized in that: The system comprises: A data synchronization module, used for NAS to obtain a user ID when a terminal accesses a network, confirm the terminal identity with AAA, allocate a terminal IP address to the terminal after the AAA returns an identity confirmation message, and send billing start information to the AAA, the AAA parses the billing start information to obtain the user ID and the terminal IP address, and calls the interface of the customized DNS to add a corresponding relationship between the user ID and the terminal IP address locally in the customized DNS; the NAS sends authorization end information to the AAA when the terminal disconnects from the network, the AAA parses the authorization end information to obtain the user ID and the terminal IP address, and calls the interface of the customized DNS to delete the corresponding relationship between the user ID and the terminal IP address locally in the customized DNS; A domain name management module, used for adding and storing domain name related information when the customized DNS receives a new domain name management request, wherein the domain name related information includes the user ID, the domain name, the IP address corresponding to the domain name, and the control policy, and there is a unique correspondence between the user ID, the domain name, the IP address, and the control policy; A domain name resolution module is used to send a domain name resolution request to the customized DNS when the terminal accesses the domain name. The customized DNS queries the user ID according to the terminal IP address, obtains the corresponding control policy according to the user ID and the domain name, executes a corresponding response according to the control policy, and returns different response results to the terminal; if the control policy is a local response, the customized DNS returns the user ID and the IP address corresponding to the domain name to the terminal; if the control policy is a proxy response, the customized DNS sends a recursive query instruction to the third-party DNS, and the third-party DNS obtains the IP address according to the domain name, and returns the IP address to the terminal. the terminal; if the control policy is to prohibit access, the customized DNS returns a response resolution failure instruction to the terminal; if the customized DNS cannot query the user ID according to the terminal IP address, the customized DNS returns the response resolution failure instruction to the terminal or sends the recursive query instruction to the third-party DNS, and the third-party DNS queries the IP address and returns it to the terminal; if the customized DNS cannot query the control policy according to the user ID and the domain name, the customized DNS returns the response resolution failure instruction to the terminal or sends the recursive query instruction to the third-party DNS, and the third-party DNS queries the IP address and returns it to the terminal.

6. The system according to claim 5, characterized in that The domain name resolution module includes: An information resolution unit, configured to send a domain name resolution request to the customized DNS when the terminal accesses the domain name, and the customized DNS queries the user ID according to the corresponding relationship between the user ID and the terminal IP address; A policy control unit, configured for the customized DNS to obtain the corresponding control policy using the user ID and the domain name according to a unique correspondence between the user ID, the domain name, the IP address and the control policy; A response execution unit is used for the customized DNS to execute a corresponding response according to the obtained management and control policy, and return different response results to the terminal.

Citation Information

Patent Citations

  • Realization method and system for accessing data service

    CN101800760A

  • Domain name access control method and device, computer storage medium and electronic equipment

    CN116723172A