Step 1
curl -fsSL https://swupdate.openvpn.net/repos/repo-public.gpg | gpg --dearmor > /etc/apt/keyrings/openvpn-repo-public.gpg
- community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos#DebianUbuntu:UsingOpenVPNaptrepositories
- archive.is/CcnQk#DebianUbuntu:UsingOpenVPNaptrepositories
- web.archive.org/web/20240716073818/https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos#DebianUbuntu:UsingOpenVPNaptrepositories
Step 2
- community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos#DebianUbuntu:UsingOpenVPNaptrepositories
- archive.is/CcnQk#DebianUbuntu:UsingOpenVPNaptrepositories
- web.archive.org/web/20240716073818/https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos#DebianUbuntu:UsingOpenVPNaptrepositories
Step 3
apt-get update
- community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos#DebianUbuntu:UsingOpenVPNaptrepositories
- archive.is/CcnQk#DebianUbuntu:UsingOpenVPNaptrepositories
- web.archive.org/web/20240716073818/https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos#DebianUbuntu:UsingOpenVPNaptrepositories
Step 4
apt-get install openvpn
- community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos#InstallingOpenVPN
- archive.is/CcnQk#InstallingOpenVPN
- web.archive.org/web/20240716073818/https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos#InstallingOpenVPN
Step 5
apt-get install openvpn-dco-dkms
- community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos#InstallingOpenVPN
- archive.is/CcnQk#InstallingOpenVPN
- web.archive.org/web/20240716073818/https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos#InstallingOpenVPN
Step 5.1
openvpn --version
Step 6
How did I setup a Certificate Authority for OpenVPN on Debian 12?
Step 7
./easyrsa gen-req server nopass
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-2-creating-the-server-certificate-key-and-encryption-files
- archive.is/5Im7t#step-2-creating-the-server-certificate-key-and-encryption-files
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-2-creating-the-server-certificate-key-and-encryption-files
Step 8
cp pki/private/server.key /etc/openvpn
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-2-creating-the-server-certificate-key-and-encryption-files
- archive.is/5Im7t#step-2-creating-the-server-certificate-key-and-encryption-files
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-2-creating-the-server-certificate-key-and-encryption-files
Step 9
./easyrsa sign-req server server
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-2-creating-the-server-certificate-key-and-encryption-files
- archive.is/5Im7t#step-2-creating-the-server-certificate-key-and-encryption-files
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-2-creating-the-server-certificate-key-and-encryption-files
Step 10
cp pki/issued/server.crt /etc/openvpn
cp pki/ca.crt /etc/openvpn
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-2-creating-the-server-certificate-key-and-encryption-files
- archive.is/5Im7t#step-2-creating-the-server-certificate-key-and-encryption-files
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-2-creating-the-server-certificate-key-and-encryption-files
Step 11
./easyrsa gen-dh
openvpn --genkey secret ta.key
cp ta.key /etc/openvpn
cp pki/dh.pem /etc/openvpn
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-2-creating-the-server-certificate-key-and-encryption-files
- archive.is/5Im7t#step-2-creating-the-server-certificate-key-and-encryption-files
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-2-creating-the-server-certificate-key-and-encryption-files
Step 12
mkdir -p /etc/openvpn/client-configs/keys
chmod -R 700 /etc/openvpn/client-configs
./easyrsa gen-req client1 nopass
cp pki/private/client1.key /etc/openvpn/client-configs/keys
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-3-generating-a-client-certificate-and-key-pair
- archive.is/5Im7t#step-3-generating-a-client-certificate-and-key-pair
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-3-generating-a-client-certificate-and-key-pair
Step 13
./easyrsa sign-req client client1
cp pki/issued/client1.crt /etc/openvpn/client-configs/keys
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-3-generating-a-client-certificate-and-key-pair
- archive.is/5Im7t#step-3-generating-a-client-certificate-and-key-pair
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-3-generating-a-client-certificate-and-key-pair
Step 14
cp pki/ca.crt /etc/openvpn/client-configs/keys
cp ta.key /etc/openvpn/client-configs/keys
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-3-generating-a-client-certificate-and-key-pair
- archive.is/5Im7t#step-3-generating-a-client-certificate-and-key-pair
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-3-generating-a-client-certificate-and-key-pair
Step 15
github.com/dmitrii-fediuk/5.9.188.84/blob/2024-07-17-5/etc/openvpn/server.conf
Step 16
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-5-adjusting-the-server-networking-configuration
- archive.is/5Im7t#step-5-adjusting-the-server-networking-configuration
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-5-adjusting-the-server-networking-configuration
Step 17
systemctl start openvpn@server
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-6-starting-and-enabling-the-openvpn-service
- archive.is/5Im7t#step-6-starting-and-enabling-the-openvpn-service
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-6-starting-and-enabling-the-openvpn-service
Step 18
systemctl status openvpn@server
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-6-starting-and-enabling-the-openvpn-service
- archive.is/5Im7t#step-6-starting-and-enabling-the-openvpn-service
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-6-starting-and-enabling-the-openvpn-service
Step 19
ip addr show tun0
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-6-starting-and-enabling-the-openvpn-service
- archive.is/5Im7t#step-6-starting-and-enabling-the-openvpn-service
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-6-starting-and-enabling-the-openvpn-service
Step 20
systemctl enable openvpn@server
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-6-starting-and-enabling-the-openvpn-service
- archive.is/5Im7t#step-6-starting-and-enabling-the-openvpn-service
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-6-starting-and-enabling-the-openvpn-service
Step 21
How did I configure iptables
for OpenVPN Server 2.6.1 on Debian 12?
Step 22
github.com/dmitrii-fediuk/5.9.188.84/blob/2024-07-17-7/etc/openvpn/client-configs/base.conf
Step 23
github.com/dmitrii-fediuk/5.9.188.84/blob/2024-07-17-8/etc/openvpn/client-configs/make_config.sh
Step 24
chmod 700 /etc/openvpn/client-configs/make_config.sh
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-7-creating-the-client-configuration-infrastructure
- archive.is/5Im7t#step-7-creating-the-client-configuration-infrastructure
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-7-creating-the-client-configuration-infrastructure
Step 25
cd /etc/openvpn/client-configs
./make_config.sh client1
- digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-8-generating-client-configurations
- archive.is/5Im7t#step-8-generating-client-configurations
- web.archive.org/web/20240717114611/https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-11#step-8-generating-client-configurations
Step 26
How did I fix the «CA not defined» error of the OpenVPN client program?