VPN multi-channel local area networking system and method based on Docker

Through the Docker containerization technology and Wireguard protocol, a VPN multi -road LAN network networking system has been created, the complexity of the multi -road local network group network on the server is solved, and the efficient and secure network connection is achieved. Topology extension and equipment interconnection.

CN119363513APending Publication Date: 2025-01-24HUATIAN NANJING ENG & TECH CORP MCC +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411118365.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2025-01-24
Patent Text Reader

Abstract

The invention discloses a VPN (Virtual Private Network) multi-channel local area networking system and a VPN multi-channel local area networking method based on Docker. The method at least comprises the following steps: creating a WireGuard server container by using Docker; the method comprises the following steps of: configuring a VPN (Virtual Private Network) server side in a WireGuard server container; the method comprises the following steps of: creating a WireGuard client container by using Docker on each piece of equipment which needs to be connected to a VPN (Virtual Private Network); and a WireGuard client side is configured in each WireGuard client side container. According to the invention, the WireGuard protocol is used as the core of the VPN technology, and the Docker container technology is combined, so that a plurality of virtual local area networks are created on one server, different devices can be safely interconnected through the VPN, and multi-channel local area networking is realized. The system provides simple, efficient and safe network connection, and is suitable for scenes of enterprise intranet topology expansion, remote equipment interconnection and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a VPN (Virtual Private Network) multi-channel local area networking system and method based on Docker containerization technology. Background Art

[0002] With the rapid development of information technology, the demand for network connections between enterprises and organizations is increasing. In the traditional network environment, physical dedicated lines or VPNs are used to achieve remote office and remote device interconnection, but these methods usually require complex network configuration and expensive hardware equipment, making network deployment and management cumbersome and expensive.

[0003] With the rise of container technology, Docker has become a popular containerization technology, which allows applications and services to run in independent containers, achieving application isolation and portability. The emergence of Docker has brought revolutionary changes to the deployment and management of network services. At the same time, VPN technology, as an important means to ensure network communication security, is also constantly evolving and improving to meet the growing network security needs.

[0004] However, there are still some challenges in implementing multiple LAN networks on a single server. Traditional VPN networks require complex configuration and management, and existing container technologies often fail to integrate VPN technology well, thus limiting the implementation of multi-channel LAN networking in a container environment. Summary of the invention

[0005] To overcome the above-mentioned defects, the object of the present invention is to provide a VPN multi-channel local area networking system and method based on Docker.

[0006] To achieve the above object, the VPN multi-channel local area networking method based on Docker of the present invention at least comprises the following steps:

[0007] Create a WireGuard server container using Docker;

[0008] Inside the WireGuard server container, configure the VPN server side;

[0009] On each device that needs to connect to the VPN, create a WireGuard client container using Docker.

[0010] Configure the WireGuard client inside each WireGuard client container.

[0011] Furthermore, the method also includes the steps of installing Docker on the server and configuring the Docker operating environment.

[0012] Furthermore, it also includes the steps of configuring the WireGuard server inside the WireGuard server container, generating the public key and private key of the WireGuard server, and mapping the server port to a port on the server.

[0013] Furthermore, the steps of configuring the WireGuard client are specifically as follows: inside each client container, add the public key of the VPN server to the client's configuration file and set the client's virtual LAN IP address; configure the client's firewall rules to ensure that VPN traffic is allowed to pass.

[0014] Furthermore, it also includes the steps of starting the connection; starting the WireGuard connection on all containers; and ensuring that the VPN connection is successfully established and that the client devices can communicate with each other.

[0015] Furthermore, the step of configuring routing is also included; configuring routing on each client container to ensure that traffic can be correctly forwarded to the target LAN through the WireGuard tunnel.

[0016] To achieve the above object, the present invention provides a system for VPN multi-channel local area networking based on Docker, comprising:

[0017] WireGuard server container, created using Docker;

[0018] A VPN server is configured inside the WireGuard server container;

[0019] A WireGuard client container, created using Docker on each device that needs to connect to the VPN;

[0020] A WireGuard client is configured in each WireGuard client container;

[0021] Each device establishes an encrypted tunnel and transmits network data connection through the WireGuard client and VPN server using the WireGuard protocol.

[0022] The present invention uses the WireGuard protocol as the core of VPN technology, combined with Docker container technology, to create multiple virtual LANs on a server, so that different devices can be securely interconnected through VPN to achieve multi-way LAN networking. This system provides a simple, efficient and secure network connection, which is suitable for scenarios such as enterprise intranet topology expansion and remote device interconnection. DETAILED DESCRIPTION

[0023] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.

[0024] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0025] Example 1

[0026] The present invention provides a system for VPN multi-channel local area networking based on Docker, comprising:

[0027] WireGuard server container, created using Docker;

[0028] A VPN server is configured inside the WireGuard server container;

[0029] A WireGuard client container, created using Docker on each device that needs to connect to the VPN;

[0030] A WireGuard client is configured in each WireGuard client container;

[0031] Each device uses the WireGuard client and VPN server to establish an encrypted tunnel and transmit network data connection through the WireGuard protocol.

[0032] WireGuard server container: A container created by Docker, which runs the WireGuard server inside and is responsible for handling VPN connections and data forwarding.

[0033] WireGuard client container: A container created by Docker that runs the WireGuard client inside and is used to connect to the VPN server and enable interconnection between devices.

[0034] VPN server configuration file: Inside the WireGuard server container, the VPN server configuration information is stored, including the server public key, private key, and IP address allocation of the virtual LAN.

[0035] VPN client configuration file: Inside each WireGuard client container, stores the configuration information required to connect to the VPN server, including the server public key, client private key, and client virtual LAN IP address.

[0036] Example 2

[0037] This embodiment is a Docker-based VPN multi-channel local area networking system and method, and the following are specific implementation steps:

[0038] Step 1: Install and configure Docker Install Docker on the server and configure the Docker runtime environment. Ensure that the Docker service is running properly and that you can create and manage containers.

[0039] Step 2: Create a WireGuard server container Use Docker to create a WireGuard server container and configure the WireGuard server inside the container. Generate the public and private keys of the WireGuard server and map the server port to a port on the server.

[0040] Step 3: Configure the WireGuard server Inside the WireGuard server container, configure the VPN server side. Set up the IP address assignment for the virtual LAN, for example, using IPv4 or IPv6 addresses. Also configure firewall rules to ensure that WireGuard traffic is allowed through.

[0041] Step 4: Create a WireGuard client container On each device that needs to connect to the VPN, use Docker to create a WireGuard client container. Each container represents an independent client device.

[0042] Step 5: Configure WireGuard Client Inside each client container, add the VPN server's public key to the client's configuration file and set the client's virtual LAN IP address. Configure the client's firewall rules to ensure that VPN traffic is allowed through.

[0043] Example 3

[0044] Based on the above embodiment, the following steps are also included:

[0045] Step 6: Start the connection Start the WireGuard connection on all containers. Make sure the VPN connection is successfully established and the client devices can communicate with each other.

[0046] Example 4

[0047] Based on the above embodiment, the following steps are also included:

[0048] Step 7: Configure routing To achieve multi-way LAN networking, you need to configure routing on each client container to ensure that traffic can be correctly forwarded to the target LAN through the WireGuard tunnel.

[0049] Through the above implementation steps, we can create a VPN multi-channel LAN system based on Docker. This system uses Docker containerization technology to deploy the WireGuard VPN service as an independent container, simplifying the network management and deployment process while providing efficient and secure network connections. It is suitable for a variety of scenarios such as enterprise intranet expansion and remote device interconnection.

[0050] The present invention is described in detail above, but the present invention is not limited to the above embodiments. Various changes can be made within the knowledge of ordinary technicians in the field without departing from the purpose of the present invention. Many other changes and modifications that do not depart from the concept and scope of the present invention should be regarded as the protection scope of the present invention.

[0051] In the description of this specification, specific features, structures, materials or characteristics may be combined in an appropriate manner in any one or more embodiments or examples.

[0052] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A VPN multi-channel local area networking method based on Docker, characterized in that: At least the following steps are included: Create a WireGuard server container using Docker; Inside the WireGuard server container, configure the VPN server side; On each device that needs to connect to the VPN, create a WireGuard client container using Docker. Configure the WireGuard client inside each WireGuard client container.

2. The VPN multi-channel local area networking method based on Docker according to claim 1, characterized in that: It also includes steps to install Docker on the server and configure the Docker runtime environment.

3. The VPN multi-channel local area networking method based on Docker according to claim 1, characterized in that: Also included are steps to configure the WireGuard server side inside the WireGuard server container, generate the WireGuard server’s public and private keys, and map the server port to a port on the server.

4. The VPN multi-channel local area networking method based on Docker according to claim 1, characterized in that: The steps for configuring the WireGuard client are as follows: inside each client container, add the VPN server's public key to the client's configuration file and set the client's virtual LAN IP address; configure the client's firewall rules to ensure that VPN traffic is allowed to pass.

5. The VPN multi-channel local area networking method based on Docker according to claim 1, characterized in that: It also includes the steps to start the connection; start the WireGuard connection on all containers; and ensure that the VPN connection is successfully established and the client devices can communicate with each other.

6. The VPN multi-channel local area networking method based on Docker according to claim 1, characterized in that: It also includes steps to configure routing; configure routing on each client container to ensure that traffic can be correctly forwarded to the target LAN through the WireGuard tunnel.

7. A VPN multi-channel local area networking system based on Docker, characterized in that: The system comprises: WireGuard server container, created using Docker; A VPN server is configured inside the WireGuard server container; A WireGuard client container, created using Docker on each device that needs to connect to the VPN; A WireGuard client is configured in each WireGuard client container; Each device establishes an encrypted tunnel and transmits network data connection through the WireGuard client and VPN server using the WireGuard protocol.