Tama.Paki paste daw dito paps palitan mo lang payload
Kung saan kayo kumuha ng server sa mga ssh sites ay ganyan ang script...ang mahalaga dyan ay ang buong config ng ovpn kung saan kayo nag reg ng server...Nice anong script ginamit mo sa vps? Yung sa Open Vpn?
Nagtry ako yung proxy same as openvpn server no luck dapat ba ibang vps yung proxy?
Useless na i-paste ang script kung hindi naman magkasalungat ang BEGIN CERTIFICATE...Paki paste daw dito paps palitan mo lang payload
Oo alam ko alam mo ba yung script na gjnamit sa ovpn? Since madami script nagkalat ibat iba ang out ng config na nagegenerate gusto ko kasi malaman anong script ng ovpn na ginamit dyan ni TSKung saan kayo kumuha ng server sa mga ssh sites ay ganyan ang script...ang mahalaga dyan ay ang buong config ng ovpn kung saan kayo nag reg ng server...
Tcpvpn yanOo alam ko alam mo ba yung script na gjnamit sa ovpn? Since madami script nagkalat ibat iba ang out ng config na nagegenerate gusto ko kasi malaman anong script ng ovpn na ginamit dyan ni TS
Tcpvpn yan
Magkaiba ang mga script sa vps at sa ssh sites...ang mahalaga dyan ay ang buong BEGIN CERTIFICATE...Oo alam ko alam mo ba yung script na gjnamit sa ovpn? Since madami script nagkalat ibat iba ang out ng config na nagegenerate gusto ko kasi malaman anong script ng ovpn na ginamit dyan ni TS
Pwede ko na tanggalin yung ibang script basta yung Certificate hindi? Nalilito kasi ako kapag may tls auth at cert key di ko tuloy mapagana yung sa Post mo TS ano ginamit na script dyan para makuha ko heheMagkaiba ang mga script sa vps at sa ssh sites...ang mahalaga dyan ay ang buong BEGIN CERTIFICATE...
Ah okay thanks pero di ko kasi alam kung ano ginamit na script ng tcpvpn sa paggenerate sino may alam ? TIA gusto ko kasi sariling server
#!/bin/bash
# OpenVPN configuration Directory
OPENVPN_CFG_DIR=/etc/openvpn
# Directory where EasyRSA outputs the client keys and certificates
KEY_DIR=/etc/openvpn/easy-rsa/keys
# Where this script should create the OpenVPN client config files
OUTPUT_DIR=/etc/openvpn/client-config
# Base configuration for the client
BASE_CONFIG=/etc/openvpn/client-config/client.conf
# MFA Label
MFA_LABEL='OpenVPN Server'
# MFA User
MFA_USER=gauth
# MFA Directory
MFA_DIR=/etc/openvpn/google-authenticator
# ##############################################################################
function send_mail() {
attachment=$1
which mutt 2>&1 >/dev/null
if [ $? -ne 0 ]; then
echo "INFO: mail program not found, an email will not be sent to the user"
else
echo -en "Please, provide the e-mail of the user\n> "
read email
echo "INFO: Sending email"
echo "Here is your OpenVPN client configuration" | mutt -s "Your OpenVPN configuration" -a "$attachment" -- "$email"
fi
}
function generate_mfa() {
user_id=$1
if [ "$user_id" == "" ]; then
echo "ERROR: No user id provided to generate MFA token"
exit 1
fi
echo "INFO: Creating user ${user_id}"
useradd -s /bin/nologin "$user_id"
echo "> Please provide a password for the user"
passwd "$user_id"
echo "INFO: Generating MFA Token"
su -c "google-authenticator -t -d -r3 -R30 -f -l \"${MFA_LABEL}\" -s $MFA_DIR/${user_id}" - $MFA_USER
}
function main() {
user_id=$1
if [ "$user_id" == "" ]; then
echo "ERROR: No user id provided"
exit 1
fi
if [ ! -f ${KEY_DIR}/ca.crt ]; then
echo "ERROR: CA certificate not found"
exit 1
fi
if [ ! -f ${KEY_DIR}/${user_id}.crt ]; then
echo "ERROR: User certificate not found"
exit 1
fi
if [ ! -f ${KEY_DIR}/${user_id}.key ]; then
echo "ERROR: User private key not found"
exit 1
fi
if [ ! -f ${OPENVPN_CFG_DIR}/ta.key ]; then
echo "ERROR: TLS Auth key not found"
exit 1
fi
cat ${BASE_CONFIG} \
<(echo -e '<ca>') \
${KEY_DIR}/ca.crt \
<(echo -e '</ca>\n<cert>') \
${KEY_DIR}/${user_id}.crt \
<(echo -e '</cert>\n<key>') \
${KEY_DIR}/${user_id}.key \
<(echo -e '</key>\n<tls-auth>') \
${OPENVPN_CFG_DIR}/ta.key \
<(echo -e '</tls-auth>') \
> ${OUTPUT_DIR}/${user_id}.ovpn
echo "INFO: Key created in ${OUTPUT_DIR}/${user_id}.ovpn"
generate_mfa $user_id
send_mail "${OUTPUT_DIR}/${user_id}.ovpn"
exit 0
}
# ##############################################################################
main $1
Anong Vps to Ubuntu 14 16 18? Oo niceCode:#!/bin/bash # OpenVPN configuration Directory OPENVPN_CFG_DIR=/etc/openvpn # Directory where EasyRSA outputs the client keys and certificates KEY_DIR=/etc/openvpn/easy-rsa/keys # Where this script should create the OpenVPN client config files OUTPUT_DIR=/etc/openvpn/client-config # Base configuration for the client BASE_CONFIG=/etc/openvpn/client-config/client.conf # MFA Label MFA_LABEL='OpenVPN Server' # MFA User MFA_USER=gauth # MFA Directory MFA_DIR=/etc/openvpn/google-authenticator # ############################################################################## function send_mail() { attachment=$1 which mutt 2>&1 >/dev/null if [ $? -ne 0 ]; then echo "INFO: mail program not found, an email will not be sent to the user" else echo -en "Please, provide the e-mail of the user\n> " read email echo "INFO: Sending email" echo "Here is your OpenVPN client configuration" | mutt -s "Your OpenVPN configuration" -a "$attachment" -- "$email" fi } function generate_mfa() { user_id=$1 if [ "$user_id" == "" ]; then echo "ERROR: No user id provided to generate MFA token" exit 1 fi echo "INFO: Creating user ${user_id}" useradd -s /bin/nologin "$user_id" echo "> Please provide a password for the user" passwd "$user_id" echo "INFO: Generating MFA Token" su -c "google-authenticator -t -d -r3 -R30 -f -l \"${MFA_LABEL}\" -s $MFA_DIR/${user_id}" - $MFA_USER } function main() { user_id=$1 if [ "$user_id" == "" ]; then echo "ERROR: No user id provided" exit 1 fi if [ ! -f ${KEY_DIR}/ca.crt ]; then echo "ERROR: CA certificate not found" exit 1 fi if [ ! -f ${KEY_DIR}/${user_id}.crt ]; then echo "ERROR: User certificate not found" exit 1 fi if [ ! -f ${KEY_DIR}/${user_id}.key ]; then echo "ERROR: User private key not found" exit 1 fi if [ ! -f ${OPENVPN_CFG_DIR}/ta.key ]; then echo "ERROR: TLS Auth key not found" exit 1 fi cat ${BASE_CONFIG} \ <(echo -e '<ca>') \ ${KEY_DIR}/ca.crt \ <(echo -e '</ca>\n<cert>') \ ${KEY_DIR}/${user_id}.crt \ <(echo -e '</cert>\n<key>') \ ${KEY_DIR}/${user_id}.key \ <(echo -e '</key>\n<tls-auth>') \ ${OPENVPN_CFG_DIR}/ta.key \ <(echo -e '</tls-auth>') \ > ${OUTPUT_DIR}/${user_id}.ovpn echo "INFO: Key created in ${OUTPUT_DIR}/${user_id}.ovpn" generate_mfa $user_id send_mail "${OUTPUT_DIR}/${user_id}.ovpn" exit 0 } # ############################################################################## main $1
Ganito ba scripts?
Ah okay thanks pero di ko kasi alam kung ano ginamit na script ng tcpvpn sa paggenerate sino may alam ? TIA gusto ko kasi sariling server
May sariling script ang bawat server kaya dapat idownload ng buo ang config na kasama na ang BEGIN CERTIFICATE....ang dapat nyo i-edit ay ang remote,user and pass,at remote proxy...un lang...idagdag lang ung custom header if naka reg ka sa mga promo ng mga networks...Ah okay thanks pero di ko kasi alam kung ano ginamit na script ng tcpvpn sa paggenerate sino may alam ? TIA gusto ko kasi sariling server
Paano yung TLS paano yung ibang Cert? Nagtry ako nyan ayaw gumana ang dami ng error kaya gusto ko sana yung script at yung config para isahan may script ka ba dyan dude pahinge ? At config thanks thanksMay sariling script ang bawat server kaya dapat idownload ng buo ang config na kasama na ang BEGIN CERTIFICATE....ang dapat nyo i-edit ay ang remote,user and pass,at remote proxy...un lang...idagdag lang ung custom header if naka reg ka sa mga promo ng mga networks...