-
Foreword
With the diversification of work, the office space is no longer limited to the company or home. Sometimes we need to access intranet resources, and the Internet cannot directly access intranet resources. It is common to deploy a VPN server.
Today I will introduce an open source VPN software: OpenVPN
-
Steps
Preparation
You can install it through the installation script. You can use any of the following methods to download the installation script.
? Install directly through the script on the official website
Under Linux system, execute the following command
wget https://git.io/vpn -O openvpn-install.sh & amp; & amp; bash openvpn-install.sh
? Directly access github, copy the contents of the script locally, and generate an installation script
https://github.com/Nyr/openvpn-install/blob/master/openvpn-install.sh
? A download address is provided here, you can directly download to the installation script, scan the code to download
Installation
If you download the script, first upload the script to the Linux server and grant execution permissions.
chmod + x openvpn-install.sh
After executing the installation script, follow the prompts to set up
./openvpn-install.sh
Select the server’s IP address
Set an IP address that can be accessed from the public network. If you have your own domain name, it is recommended to enter the domain name address.
For security and not to be detected by the port, we choose the recommended UDP protocol
Enter the port of the VPN service. Generally, you can use the default one.
Select the DNS server. Generally, you can use the configuration of this machine.
The installation process will generate a client account, we enter one and press Enter
Press Enter to start installation
When the following message appears, the installation is successful.
The penultimate line of the log prompts that the generated client account configuration file is saved in
/root/pande.ovpn
The client program needs this configuration file when connecting to VPN
-
Client program
Scan code to download
Or download from Baidu Cloud Disk
Extraction code: knef
-
Configuration
Server
The configuration information of the service is stored in the following files
/etc/openvpn/server/server.conf
The service script is
systemctl status [email protected]
Client
The configuration file corresponding to the account generated during the installation process does not have a password.
/root/pande.ovpn
-
Client connection
Installation
Install the client program. The installation process is relatively simple and only takes a few steps to install.
Prompt that the configuration file of the client account needs to be placed in one of the directories.
Place the client configuration file into the configuration directory under the installation directory. In this example, put the /root/pande.ovpn file generated on the server into one of the above directories.
Start
Double-click the shortcut on the desktop to open the client program
Right-click the icon on the taskbar and select [Connect]
This will allow you to connect to the VPN server.
For more introduction, please visit the official website: https://github.com/Nyr/openvpn-install
-
Write at the end
After a few simple steps, we successfully set up a VPN server. For more configuration and usage, please refer to the introduction on the official website.
If you have any questions about the installation process, please leave a message.