Patent ID: 8011004

Claim:
An apparatus for virtual private network (VPN) communication in a socket level, the apparatus comprising: a VPN database for storing connection information of an internal device and an external device and security-related information associated with the connection information; a packet analyzing module for analyzing a packet received from the internal device or the external device, obtaining connection information of the device, and storing the obtained connection information in the VPN database; a key exchange engine for performing a key sharing process with the device, generating the security-related information associated with the connection information, and storing the generated security-related information in the VPN database; and a socket data processing engine for encoding or decoding data in the socket level based on the security-related information stored in the VPN database, wherein the data is transmitted to and received from the internal device or the external device, wherein the encoding and decoding of data in the socket-level based on the security-related information stored in the VPN database comprises: detecting an input/output change in at least one socket; analyzing socket file descriptor information of the detected socket based on the connection information stored in the VPN database, and determining whether the connection of device is initial connection; when the connection of the device is the initial connection, allowing a connection request based on the connection information stored in the VPN database; receiving a packet from the device; determining whether the packet is received via an external network interface or an internal network interface; when the packet is received via the external network interface, decoding the received packet using the security-related information stored in the VPN database; and when the packet is received via the internal network interface, encoding the received packet using the security-related information.