The invention discloses a network access method and device, and relates to the technical field of computers, and the method comprises the steps: receiving an intranet access request, determining a user identifier in the intranet access request, and verifying the authority of the user identifier; in response to determining that the verification is passed, sending an intranet access request to an intranet server cluster, so that the intranet server cluster obtains target data according to the intranet access request and returns the target data; receiving target data, and generating a dynamic secret key to dynamically encrypt the target data to obtain dynamic encrypted data; determining an access address and an access port identifier corresponding to the intranet access request, determining a corresponding secure tunnel based on the access address and the access port identifier, performing secure tunnel encryption on the dynamic encrypted data, and generating secure tunnel encrypted data; and sending the secure tunnel encrypted data to the browser client for viewing. When a user has a frequent internal and external network access requirement, the internal and external networks do not need to be switched frequently, and the purpose of information security is achieved at the same time.