Last active
May 9, 2020 10:33
-
-
Save sierra-tango-echo/e0be46d4f372cf9008ac6e91ca238b0a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLUSTER=$1 | |
IP=`curl --silent http://ipecho.net/plain` | |
CA=`cat /etc/openvpn/easyrsa/pki/ca.crt` | |
CRT=`cat /etc/openvpn/easyrsa/pki/issued/$CLUSTER.crt` | |
KEY=`cat /etc/openvpn/easyrsa/pki/private/$CLUSTER.key` | |
TA=`cat /etc/openvpn/easyrsa/ta.key` | |
cat << EOF > /root/install_$CLUSTER.run | |
cat << EOD > /etc/openvpn/flightconnector.conf | |
client | |
dev tun | |
proto tcp | |
remote $IP 2005 | |
remote-cert-tls server | |
resolv-retry infinite | |
nobind | |
persist-key | |
persist-tun | |
<ca> | |
$CA | |
</ca> | |
<cert> | |
$CRT | |
</cert> | |
<key> | |
$KEY | |
</key> | |
comp-lzo adaptive | |
verb 3 | |
log /var/log/openvpn-fc.log | |
log-append /var/log/openvpn-fc.log | |
cipher AES-256-CBC | |
auth SHA512 | |
tls-version-min 1.2 | |
tls-client | |
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384 | |
key-direction 1 | |
<tls-auth> | |
$TA | |
</tls-auth> | |
topology subnet | |
EOD | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment