-
-
Save giig982/01360a465802b7256e7ae245bdd89996 to your computer and use it in GitHub Desktop.
Revisions
-
laurenorsini revised this gist
Apr 23, 2014 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,8 +15,7 @@ read NAME #1st Verify that client’s Public Key Exists if [ ! -f $NAME$CRT ]; then echo "[ERROR]: Client Public Key Certificate not found: $NAME$CRT" exit fi echo "Client’s cert found: $NAME$CR" -
laurenorsini revised this gist
Apr 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -67,7 +67,7 @@ echo "<tls-auth>" >> $NAME$FILEEXT cat $TA >> $NAME$FILEEXT echo "</tls-auth>" >> $NAME$FILEEXT echo "Done! $NAME$FILEEXT Successfully Created." #Script written by Eric Jodoin \ No newline at end of file -
laurenorsini revised this gist
Apr 23, 2014 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ #!/bin/bash # Default Variable Declarations -
laurenorsini revised this gist
Apr 23, 2014 . No changes.There are no files selected for viewing
-
laurenorsini revised this gist
Apr 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ CA="ca.crt" TA="ta.key" #Ask for a Client name echo "Please enter an existing Client Name:" read NAME -
laurenorsini revised this gist
Apr 23, 2014 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -55,8 +55,7 @@ echo "</ca>" >> $NAME$FILEEXT #Next append the client Public Cert echo "<cert>" >> $NAME$FILEEXT cat $NAME$CRT | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' >> $NAME$FILEEXT echo "</cert>" >> $NAME$FILEEXT #Then, append the client Private Key -
laurenorsini revised this gist
Apr 23, 2014 . 1 changed file with 73 additions and 73 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,75 +1,75 @@ @@ -0,0 +1,73 @@ #!/bin/bash # Default Variable Declarations DEFAULT="Default.txt" FILEEXT=".ovpn" CRT=".crt" KEY=".3des.key" CA="ca.crt" TA="ta.key" #Ask for a Client name echo "Please enter an existing Client Name:" read NAME #1st Verify that client’s Public Key Exists if [ ! -f $NAME$CRT ]; then echo "[ERROR]: Client Public Key Certificate not found: $NAME$CRT" exit fi echo "Client’s cert found: $NAME$CR" #Then, verify that there is a private key for that client if [ ! -f $NAME$KEY ]; then echo "[ERROR]: Client 3des Private Key not found: $NAME$KEY" exit fi echo "Client’s Private Key found: $NAME$KEY" #Confirm the CA public key exists if [ ! -f $CA ]; then echo "[ERROR]: CA Public Key not found: $CA" exit fi echo "CA public Key found: $CA" #Confirm the tls-auth ta key file exists if [ ! -f $TA ]; then echo "[ERROR]: tls-auth Key not found: $TA" exit fi echo "tls-auth Private Key found: $TA" #Ready to make a new .opvn file - Start by populating with the default file cat $DEFAULT > $NAME$FILEEXT #Now, append the CA Public Cert echo "<ca>" >> $NAME$FILEEXT cat $CA >> $NAME$FILEEXT echo "</ca>" >> $NAME$FILEEXT #Next append the client Public Cert echo "<cert>" >> $NAME$FILEEXT cat $NAME$CRT | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' >> $NAME$FILEEXT echo "</cert>" >> $NAME$FILEEXT #Then, append the client Private Key echo "<key>" >> $NAME$FILEEXT cat $NAME$KEY >> $NAME$FILEEXT echo "</key>" >> $NAME$FILEEXT #Finally, append the TA Private Key echo "<tls-auth>" >> $NAME$FILEEXT cat $TA >> $NAME$FILEEXT echo "</tls-auth>" >> $NAME$FILEEXT echo "Done! $NAME$FILEEXT Successfully Created.” #Script written by Eric Jodoin \ No newline at end of file -
laurenorsini revised this gist
Apr 16, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ +#!/bin/bash + +# Default Variable Declarations +DEFAULT="Default.txt" +FILEEXT=".ovpn" +CRT=".crt" +KEY=".3des.key" -
laurenorsini revised this gist
Apr 15, 2014 . 1 changed file with 75 additions and 73 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,73 +1,75 @@ @@ -0,0 +1,73 @@ +#!/bin/bash + +# Default Variable Declarations +DEFAULT="Defaults.txt" +FILEEXT=".ovpn" +CRT=".crt" +KEY=".3des.key" +CA="ca.crt" +TA="ta.key" + +#Ask for a Client name +echo "Please enter an existing Client Name:" +read NAME + + +#1st Verify that client’s Public Key Exists +if [ ! -f $NAME$CRT ]; then + echo "[ERROR]: Client Public Key Certificate not found: +$NAME$CRT" + exit +fi +echo "Client’s cert found: $NAME$CR" + + +#Then, verify that there is a private key for that client +if [ ! -f $NAME$KEY ]; then + echo "[ERROR]: Client 3des Private Key not found: $NAME$KEY" + exit +fi +echo "Client’s Private Key found: $NAME$KEY" + +#Confirm the CA public key exists +if [ ! -f $CA ]; then + echo "[ERROR]: CA Public Key not found: $CA" + exit +fi +echo "CA public Key found: $CA" + +#Confirm the tls-auth ta key file exists +if [ ! -f $TA ]; then + echo "[ERROR]: tls-auth Key not found: $TA" + exit +fi +echo "tls-auth Private Key found: $TA" + +#Ready to make a new .opvn file - Start by populating with the +default file +cat $DEFAULT > $NAME$FILEEXT + +#Now, append the CA Public Cert +echo "<ca>" >> $NAME$FILEEXT +cat $CA >> $NAME$FILEEXT +echo "</ca>" >> $NAME$FILEEXT + +#Next append the client Public Cert +echo "<cert>" >> $NAME$FILEEXT +cat $NAME$CRT | sed -ne '/-BEGIN CERTIFICATE-/,/-END +CERTIFICATE-/p' >> $NAME$FILEEXT +echo "</cert>" >> $NAME$FILEEXT + +#Then, append the client Private Key +echo "<key>" >> $NAME$FILEEXT +cat $NAME$KEY >> $NAME$FILEEXT +echo "</key>" >> $NAME$FILEEXT + +#Finally, append the TA Private Key +echo "<tls-auth>" >> $NAME$FILEEXT +cat $TA >> $NAME$FILEEXT +echo "</tls-auth>" >> $NAME$FILEEXT + +echo "Done! $NAME$FILEEXT Successfully Created.” + +#Script written by Eric Jodoin \ No newline at end of file -
laurenorsini created this gist
Apr 7, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,73 @@ #!/bin/bash # Default Variable Declarations DEFAULT="Defaults.txt" FILEEXT=".ovpn" CRT=".crt" KEY=".3des.key" CA="ca.crt" TA="ta.key" #Ask for a Client name echo "Please enter an existing Client Name:" read NAME #1st Verify that client’s Public Key Exists if [ ! -f $NAME$CRT ]; then echo "[ERROR]: Client Public Key Certificate not found: $NAME$CRT" exit fi echo "Client’s cert found: $NAME$CR" #Then, verify that there is a private key for that client if [ ! -f $NAME$KEY ]; then echo "[ERROR]: Client 3des Private Key not found: $NAME$KEY" exit fi echo "Client’s Private Key found: $NAME$KEY" #Confirm the CA public key exists if [ ! -f $CA ]; then echo "[ERROR]: CA Public Key not found: $CA" exit fi echo "CA public Key found: $CA" #Confirm the tls-auth ta key file exists if [ ! -f $TA ]; then echo "[ERROR]: tls-auth Key not found: $TA" exit fi echo "tls-auth Private Key found: $TA" #Ready to make a new .opvn file - Start by populating with the default file cat $DEFAULT > $NAME$FILEEXT #Now, append the CA Public Cert echo "<ca>" >> $NAME$FILEEXT cat $CA >> $NAME$FILEEXT echo "</ca>" >> $NAME$FILEEXT #Next append the client Public Cert echo "<cert>" >> $NAME$FILEEXT cat $NAME$CRT | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' >> $NAME$FILEEXT echo "</cert>" >> $NAME$FILEEXT #Then, append the client Private Key echo "<key>" >> $NAME$FILEEXT cat $NAME$KEY >> $NAME$FILEEXT echo "</key>" >> $NAME$FILEEXT #Finally, append the TA Private Key echo "<tls-auth>" >> $NAME$FILEEXT cat $TA >> $NAME$FILEEXT echo "</tls-auth>" >> $NAME$FILEEXT echo "Done! $NAME$FILEEXT Successfully Created.” #Script written by Eric Jodoin