export KEY_COUNTRY="US"
export KEY_PROVINCE="CA"
export KEY_CITY="SanFrancisco"
export KEY_ORG="Fort-Funston"
export KEY_EMAIL="me@example.com"
sh
./clean-all && . ./vars
./build-ca
Generating a 1024 bit RSA private key ..++++++ .........++++++ writing new private key to 'ca.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [US]: State or Province Name (full name) [CA]: Locality Name (eg, city) [SanFrancisco]: Organization Name (eg, company) [Fort-Funston]: Organizational Unit Name (eg, section) [changeme]: Common Name (eg, your name or your server's hostname) [changeme]:server2 Name [changeme]: Email Address [me@example.com]:./build-key-server server2
Generating a 1024 bit RSA private key ..............++++++ ......................................................................++++++ writing new private key to 'server2.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [US]: State or Province Name (full name) [CA]: Locality Name (eg, city) [SanFrancisco]: Organization Name (eg, company) [Fort-Funston]: Organizational Unit Name (eg, section) [changeme]: Common Name (eg, your name or your server's hostname) [server2]: Name [changeme]: Email Address [me@example.com]: Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: Using configuration from /usr/local/etc/openvpn/easy-rsa/openssl-0.9.8.cnf Check that the request matches the signature Signature ok The Subject's Distinguished Name is as follows countryName :PRINTABLE:'US' stateOrProvinceName :PRINTABLE:'CA' localityName :PRINTABLE:'SanFrancisco' organizationName :PRINTABLE:'Fort-Funston' organizationalUnitName:PRINTABLE:'changeme' commonName :PRINTABLE:'server2' name :PRINTABLE:'changeme' emailAddress :IA5STRING:'me@example.com' Certificate is to be certified until Mar 15 12:37:05 2022 GMT (3650 days) Sign the certificate? [y/n]:y 1 out of 1 certificate requests certified, commit? [y/n]y Write out database with 1 new entries Data Base Updated./build-key client2
Generating a 1024 bit RSA private key .++++++ ...++++++ writing new private key to 'client2.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [US]: State or Province Name (full name) [CA]: Locality Name (eg, city) [SanFrancisco]: Organization Name (eg, company) [Fort-Funston]: Organizational Unit Name (eg, section) [changeme]: Common Name (eg, your name or your server's hostname) [client2]: Name [changeme]: Email Address [me@example.com]: Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: Using configuration from /usr/local/etc/openvpn/easy-rsa/openssl-0.9.8.cnf Check that the request matches the signature Signature ok The Subject's Distinguished Name is as follows countryName :PRINTABLE:'US' stateOrProvinceName :PRINTABLE:'CA' localityName :PRINTABLE:'SanFrancisco' organizationName :PRINTABLE:'Fort-Funston' organizationalUnitName:PRINTABLE:'changeme' commonName :PRINTABLE:'client2' name :PRINTABLE:'changeme' emailAddress :IA5STRING:'me@example.com' Certificate is to be certified until Mar 15 12:38:53 2022 GMT (3650 days) Sign the certificate? [y/n]:y 1 out of 1 certificate requests certified, commit? [y/n]y Write out database with 1 new entries Data Base Updated./build-dh exit openvpn --genkey --secret /usr/local/etc/openvpn/easy-rsa/keys/ta.key cp /usr/local/share/doc/openvpn/sample-config-files/server.conf /usr/local/etc/openvpn/openvpn.conf
- Certificates path:
Пути к файлам сертификатов:ca /usr/local/etc/openvpn/easy-rsa/keys/ca.crt cert /usr/local/etc/openvpn/easy-rsa/keys/server2.crt key /usr/local/etc/openvpn/easy-rsa/keys/server2.key dh /usr/local/etc/openvpn/easy-rsa/keys/dh1024.pem - Turn TCP mode on:
Включаем TCP вместо UDP:;proto udp proto tcp - Uncomment the following lines:
Раскомментируйте следующие строки:push "redirect-gateway def1 bypass-dhcp"push "dhcp-option DNS 208.67.222.222"This will enable routing of all your traffic through the VPN server i.e. your public IP will be same as the assigned to VPS one.
Именно эти параметры перенаправят весь ваш траффик через сервер, в результате вашим публичным IP станет адрес VDS сервера, а реальный IP будет скрыт.
No comments:
Post a Comment