The invention discloses a method for filtering webpage access based on a kernel driver, which belongs to the technical field of
internet communication and comprises the following steps: step 1, a user inputs an access website for a user browser to generate a DNS (
Domain Name Server) query request message; 2, judging whether a DNS query request message exists in a local DNS cache or not, if yes, obtaining an
IP address for access, and if not, executing a step 3; and step 3, sending a query request to a DNS
server, constructing a complete DNS query request
network packet according to a network protocol standard, capturing all DNS query request network packets sent to the 53 port by a kernel driving program, and then analyzing target domain names of the DNS query request network packets through a DNS protocol. Centralized and automatic management and control are achieved, the
system is particularly suitable for scenes such as
machine rooms and classrooms needing unified
network behavior management, and the operation and maintenance cost is greatly reduced.