Get the App
SLTechnology News&Howtos  ›  Network Security  › 

OpenVPN Tips

Shulou Source: shulou.com Published: 2022-06-01 07:05:15 11月25日 Update

Official download link (Fan Qiang may be required): https://open vpn.net/index.php/open-source/downloads.html

Generate certificates: create CA, generate server and client certificates (OpenVPN official documents), official website links.

Detailed description of OpenVPN server side configuration file

If multiple clients use the same certificate, you need to turn on the duplicate-cn option.

Push a fixed ip to the client.

C:\ Program Files\ OpenVPN\ config\ server.ovpn:

Server 192.168.99.0 255.255.255.0client-config-dir "C:\ Program Files\\ OpenVPN\\ config\\ ccd"

C:\ Program Files\ OpenVPN\ config\ ccd\ client:

Ifconfig-push 192.168.99.77 255.255.255.0

If the network mask of the two configurations is not the same, the client needs to configure the gateway of the tap virtual network card separately in order to communicate normally.

Dh files (dh {n} .pem, Diffie Hellman) are required only on the server side, not on the client side.

Change logging file, add to the configuration file (server.ovpn/server.conf):

Log/ var/log/openvpn.log

[FAQ]

Failure of OpenVPN virtual network card under Q:Windows

A: first of all, restart the network card ("disable" and "enable") to see if you can solve the problem.

If the restart is not effective, you can delete and create a new virtual Nic through the scripts in all programs-> TAP-Windows-> Utilities.

Q: configure OpenVPN boot auto connection under Windows.

A: method 1, add "--connect client.ovpn" after the shortcut, and then move the shortcut to the Startup directory.

Method 2, modify the registry [HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ Run], "Open × ×" = "D:\ Program Files\ OpenVPN\ bin\ openvpn-gui.exe-- connect client.ovpn".

If you don't want to display the connection dialog box, find the item [HKEY_LOCAL_MACHINE\ SOFTWARE\ OpenVPN-GUI] below and change the value of the "silent_connection" item to "1".

[related reading]

Port forwarding (Linux/Windows)

OpenVPN deployment Scheme with large number of users (1)

* walker * *

Tags: Client client configuration file network card certificate official fault method method link service generation same consistent multiple document scheme log server Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Redmi NVidia MySQL Apple