User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
documentation:examples:gre_ipsec_and_openvpn [2020/01/13 14:19]
olivier [Testing]
documentation:examples:gre_ipsec_and_openvpn [2020/06/29 16:48] (current)
olivier [VM2: OpenVPN server]
Line 1054: Line 1054:
 passwd passwd
 </code> </code>
-==== VM4: OpenVPN client ==== 
-As OpenVPN client, VM4 should get these files from VM2 and put them in /usr/local/etc/openvpn: +Now Generate client configuration file with embedded certificates:
-  * ca.crt +
-  * VM4.crt +
-  * VM4.key+
-On this lab, scp can be used for getting these files: 
 <code> <code>
-mkdir /usr/local/etc/openvpn +cat > /usr/local/etc/openvpn/VM4-openvpn.conf <<'EOF'
-scp /usr/local/etc/openvpn +
-scp /usr/local/etc/openvpn +
-scp /usr/local/etc/openvpn +
-</code> +
- +
-Configure openvpn as a client: +
- +
-<code> +
-cat > /usr/local/etc/openvpn/openvpn.conf <<'EOF'+
 client client
 dev tun dev tun
 remote remote
-ca ca.crt +<ca>
-cert VM4.crt +
-key VM4.key+
 'EOF' 'EOF'
 +cat /usr/local/etc/easy-rsa/pki/ca.crt >> /usr/local/etc/openvpn/VM4-openvpn.conf
 +echo '</ca>' >> /usr/local/etc/openvpn/VM4-openvpn.conf
 +echo '<cert>' >> /usr/local/etc/openvpn/VM4-openvpn.conf
 +cat /usr/local/etc/easy-rsa/pki/issued/VM4.crt >> /usr/local/etc/openvpn/VM4-openvpn.conf
 +echo '</cert>' >> /usr/local/etc/openvpn/VM4-openvpn.conf
 +echo '<key>' >> /usr/local/etc/openvpn/VM4-openvpn.conf
 +cat /usr/local/etc/easy-rsa/pki/private/VM4.key >> /usr/local/etc/openvpn/VM4-openvpn.conf
 +echo '</key>' >> /usr/local/etc/openvpn/VM4-openvpn.conf
 </code> </code>
 +==== VM4: OpenVPN client ====
 +As OpenVPN client, VM4 should get its openvpn configuration file (that embedded certificate and key) from VM2 and put them in /usr/local/etc/openvpn.
 +On this lab, scp can be used for getting these files:
 +mkdir /usr/local/etc/openvpn
 +scp /usr/local/etc/openvpn/openvpn.conf
 Enable and start openvpn: Enable and start openvpn:
documentation/examples/gre_ipsec_and_openvpn.1578921541.txt.gz · Last modified: 2020/01/13 14:19 by olivier