OpenVPN
作者:互联网
$sudo apt i n s t a l l openvpn easy−r s a
copy the easy−rsa directory to /etc/openvpn. This will ensure that any changes to
the scripts will not be lost when the package is updated. From a terminal, run:
$sudo make−cadir/etc/openvpn/ easy−rsa
edit vars file
. . .
export KEY_COUNTRY=“US”
export KEY_PROVINCE=“CA”
export KEY_CITY=“SanFrancisco”
export KEY_ORG=“Fort-Funston”
export KEY_EMAIL=“me@myhost.mydomain”
export KEY_OU=“MyOrganizationalUnit”
. . .
$source vars
$./clean-all
$./build-ca
$./build-key-server customservername
We can generate a strong Diffie-Hellman keys to use during key exchange by typing:
$./build-dh
This might take a few minutes to complete.
Afterwards, we can generate an HMAC (Diffie-Hellman算法) signature to strengthen the server’s TLS integrity verification capabilities:
$openvpn --genkey --secret keys/ta.key
Generate a client certificate
$cd ~/openvpn-ca
$source vars
$./build-key client1
Copy client cert from server to client
scp -P2222 john@192.168.1.100:~/Desktop/MHN_error_solve ./
$systemctl start openvpn@myserver
$systemctl start openvpn@client
$journalctl -xe # to show vpn info
标签:KEY,OpenVPN,client,export,build,key,openvpn 来源: https://blog.csdn.net/m0_54553238/article/details/118939176