Patent ID: 8726375

Claim:
A method for preventing Domain Name System (DNS) spoofing comprising: performing uppercase/lowercase conversion for a portion of first letters in a DNS inquiry field of a DNS request packet according to a preset rule; sending the DNS request packet to a DNS server; receiving a DNS response packet in response to the DNS request packet; obtaining uppercase/lowercase distribution of second letters in a DNS inquiry field of the DNS response packet; determining that the uppercase/lowercase distribution of the second letters in the DNS inquiry field of the DNS response packet complies with the preset rule; and based upon the determining, forwarding the DNS response packet to a target DNS client; wherein the performing the uppercase/lowercase conversion for the portion of the first letters in the DNS inquiry field of the DNS request packet according to the preset rule comprises: performing Hash calculation by using one or more of: a source Internet Protocol (IP) address, a destination IP address, a source port, a destination port, a DNS identifier, a DNS question field data, and an answer field in the DNS response packet, and performing the uppercase/lowercase conversion for the portion of the first letters in the DNS inquiry field of the DNS request packet according to a value obtained by the Hash calculation; wherein the determining that the uppercase/lowercase distribution of the second letters in the DNS inquiry field of the DNS response packet complies with the preset rule comprises: determining that the uppercase/lowercase distribution of the second letters in the DNS inquiry field of the DNS response packet complies with the value obtained by the Hash calculation.