daily pastebin goal
59%
SHARE
TWEET

Untitled

a guest May 16th, 2018 238 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. insmod tun
  2. mkdir /dev/net
  3. mknod /dev/net/tun c 10 200
  4. mknod /dev/tap0 c 36 17
  5. openvpn --mktun --dev tap0
  6. mkdir /etc/openvpn/
  7. mkdir /etc/openvpn/keys/
  8. echo "
  9. dev tap0
  10. proto tcp-client
  11. #port 5000
  12. remote 10.254.200.219
  13. #ifconfig 10.1.1.1 10.1.1.2
  14. #up /etc/openvpn/office1.up
  15. #own /etc/openvpn/office1.down
  16. tls-client
  17. #tls-timeout 120
  18. dh /etc/openvpn/dh1024.pem
  19. ca /etc/openvpn/keys/ca.crt
  20. cert /etc/openvpn/keys/client_1.crt
  21. key /etc/openvpn/keys/client_1.key
  22. persist-tun
  23. persist-key
  24. #verb 3
  25. keepalive 10 120
  26. cipher none
  27. auth none
  28. pull
  29. auth-user-pass /etc/openvpn/auth.cfg" > /etc/openvpn/client.conf
  30.  
  31. echo "kottedge
  32. kottedge" > /etc/openvpn/auth.cfg
  33.  
  34.  
  35. echo "Certificate:
  36.     Data:
  37.         Version: 3 (0x2)
  38.         Serial Number: 5 (0x5)
  39.         Signature Algorithm: sha1WithRSAEncryption
  40.         Issuer: C=RU, ST=Kirov, L=Kirov, O=ZAO Relax, CN=ZAO Relax CA/emailAddress=gescheit@list.ru
  41.         Validity
  42.             Not Before: Jan 15 09:12:05 2010 GMT
  43.             Not After : Jan 13 09:12:05 2020 GMT
  44.         Subject: C=RU, ST=Kirov, L=Kirov, O=ZAO Relax, CN=client_1/emailAddress=gescheit@list.ru
  45.         Subject Public Key Info:
  46.             Public Key Algorithm: rsaEncryption
  47.             RSA Public Key: (1024 bit)
  48.                 Modulus (1024 bit):
  49.                     00:b4:1c:83:d8:49:28:99:53:ac:12:64:72:ed:63:
  50.                     d8:61:f6:d8:dc:ec:f5:17:fb:f2:67:7b:24:5f:52:
  51.                     a9:f5:a3:eb:4f:3a:6b:09:49:39:c0:c9:f5:ea:36:
  52.                     57:bb:ff:a6:3c:49:b8:ea:d3:ba:32:92:bc:82:6e:
  53.                     08:e5:ae:fc:45:38:1b:f9:72:5e:9e:58:7e:58:08:
  54.                     2c:ea:0c:4e:e8:a2:b4:52:9b:94:9f:33:65:fd:d3:
  55.                     1d:0e:df:78:4a:da:e7:57:7e:8d:d7:ea:dd:6d:18:
  56.                     47:28:d6:b8:08:23:3f:5b:8f:67:77:b9:51:44:35:
  57.                     ff:25:04:7f:b5:94:be:cc:99
  58.                 Exponent: 65537 (0x10001)
  59.         X509v3 extensions:
  60.             X509v3 Basic Constraints:
  61.                 CA:FALSE
  62.             Netscape Comment:
  63.                 Easy-RSA Generated Certificate
  64.             X509v3 Subject Key Identifier:
  65.                 A1:42:BC:B7:5E:CF:3F:4E:8D:D0:EC:B7:2A:64:8B:E8:E3:F1:4B:A2
  66.             X509v3 Authority Key Identifier:
  67.                 keyid:F9:43:E0:3C:31:EA:47:F9:6D:C4:9F:40:D5:6B:C8:90:0F:16:EC:48
  68.                 DirName:/C=RU/ST=Kirov/L=Kirov/O=ZAO Relax/CN=ZAO Relax CA/emailAddress=gescheit@list.ru
  69.                 serial:F4:8D:52:83:77:24:4D:EE
  70.  
  71.             X509v3 Extended Key Usage:
  72.                 TLS Web Client Authentication
  73.             X509v3 Key Usage:
  74.                 Digital Signature
  75.     Signature Algorithm: sha1WithRSAEncryption
  76.         c4:1f:45:48:44:d3:77:c1:1f:f1:14:7b:30:25:68:f7:66:e1:
  77.         01:73:83:f2:2b:44:9e:1c:e7:c1:8b:9c:55:b9:f6:d6:f0:12:
  78.         0b:f4:8d:84:6b:53:8d:21:65:30:f5:4b:65:d7:93:61:29:60:
  79.         aa:cd:c1:0d:48:fe:0b:1d:e5:7c:4a:be:a4:1f:b7:2e:6e:62:
  80.         9f:7d:17:66:5e:a9:0f:48:90:d2:1d:41:3d:97:f5:11:f3:8d:
  81.         ed:ee:04:4c:1d:76:b4:96:cf:01:1f:1b:74:05:64:35:b7:e3:
  82.         ef:eb:68:f1:cf:41:7e:cc:ad:05:54:87:5a:19:37:a6:cf:07:
  83.         b2:3a
  84. -----BEGIN CERTIFICATE-----
  85. MIIDkzCCAvygAwIBAgIBBTANBgkqhkiG9w0BAQUFADB5MQswCQYDVQQGEwJSVTEO
  86. MAwGA1UECBMFS2lyb3YxDjAMBgNVBAcTBUtpcm92MRIwEAYDVQQKEwlaQU8gUmVs
  87. YXgxFTATBgNVBAMTDFpBTyBSZWxheCBDQTEfMB0GCSqGSIb3DQEJARYQZ2VzY2hl
  88. aXRAbGlzdC5ydTAeFw0xMDAxMTUwOTEyMDVaFw0yMDAxMTMwOTEyMDVaMHUxCzAJ
  89. BgNVBAYTAlJVMQ4wDAYDVQQIEwVLaXJvdjEOMAwGA1UEBxMFS2lyb3YxEjAQBgNV
  90. BAoTCVpBTyBSZWxheDERMA8GA1UEAxQIY2xpZW50XzExHzAdBgkqhkiG9w0BCQEW
  91. EGdlc2NoZWl0QGxpc3QucnUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALQc
  92. g9hJKJlTrBJkcu1j2GH22Nzs9Rf78md7JF9SqfWj6086awlJOcDJ9eo2V7v/pjxJ
  93. uOrTujKSvIJuCOWu/EU4G/lyXp5YflgILOoMTuiitFKblJ8zZf3THQ7feEra51d+
  94. jdfq3W0YRyjWuAgjP1uPZ3e5UUQ1/yUEf7WUvsyZAgMBAAGjggEtMIIBKTAJBgNV
  95. HRMEAjAAMC0GCWCGSAGG+EIBDQQgFh5FYXN5LVJTQSBHZW5lcmF0ZWQgQ2VydGlm
  96. aWNhdGUwHQYDVR0OBBYEFKFCvLdezz9OjdDstypki+jj8UuiMIGrBgNVHSMEgaMw
  97. gaCAFPlD4Dwx6kf5bcSfQNVryJAPFuxIoX2kezB5MQswCQYDVQQGEwJSVTEOMAwG
  98. A1UECBMFS2lyb3YxDjAMBgNVBAcTBUtpcm92MRIwEAYDVQQKEwlaQU8gUmVsYXgx
  99. FTATBgNVBAMTDFpBTyBSZWxheCBDQTEfMB0GCSqGSIb3DQEJARYQZ2VzY2hlaXRA
  100. bGlzdC5ydYIJAPSNUoN3JE3uMBMGA1UdJQQMMAoGCCsGAQUFBwMCMAsGA1UdDwQE
  101. AwIHgDANBgkqhkiG9w0BAQUFAAOBgQDEH0VIRNN3wR/xFHswJWj3ZuEBc4PyK0Se
  102. HOfBi5xVufbW8BIL9I2Ea1ONIWUw9Utl15NhKWCqzcENSP4LHeV8Sr6kH7cubmKf
  103. fRdmXqkPSJDSHUE9l/UR843t7gRMHXa0ls8BHxt0BWQ1t+Pv62jxz0F+zK0FVIda
  104. GTemzweyOg==
  105. -----END CERTIFICATE-----
  106. " > /etc/openvpn/keys/client_1.crt
  107.  
  108.  
  109. echo "
  110. -----BEGIN RSA PRIVATE KEY-----
  111. MIICXQIBAAKBgQC0HIPYSSiZU6wSZHLtY9hh9tjc7PUX+/JneyRfUqn1o+tPOmsJ
  112. STnAyfXqNle7/6Y8Sbjq07oykryCbgjlrvxFOBv5cl6eWH5YCCzqDE7oorRSm5Sf
  113. M2X90x0O33hK2udXfo3X6t1tGEco1rgIIz9bj2d3uVFENf8lBH+1lL7MmQIDAQAB
  114. AoGASi+cls+7azwtmf3J4MHJdMBqHsVzRoe+FqWAG8s+ujDkUWPshoykvyXwpqHv
  115. jT4FyLtM8Vx4SzBpeQe9nm1u9prusDlkMvbkHYQ0CuS8yoglbs0vmOEMV+dplw1D
  116. 7Xr++lCD/Y3qw5mPazbrEt/To3hC26UBrHvLuYrIyoXrHAkCQQDb57dQiwpb1+84
  117. QHameuoWPxIjLuKhiFGTxuia7/+F9VbckZFRvIXu6Rcq29Jes7l3IvGpGG9zX9ru
  118. m5wX/jSLAkEA0aywXl2eKXWQqMK2a523mj9barMG+M7jbNzP4hCCbDa1R+0ohGAb
  119. L3v0NkyEQ611VU0KdJ8p8mYIpNft4ALT6wJBAKfnEXF+6AbeJbnmhnFwkgEwYPHa
  120. H5JEWj0h94ItUwV+ILdCshkdf4m+EUFZHBPQ2AAd/zQkAxytiKT8zT8IiicCQAud
  121. Ew/HA7GsL10Jm+0OCVNj2v5n+CTj4Ljw6hrNa0vvI89eFXZvlFHm/bncNx9AhlU5
  122. NTEMd9hTSntG8ogL4A0CQQCEkmHgCikSiycXLsqXrFucsQmg0mtlDuo5o03qSUW4
  123. QlZxyTHjPeAD8/yak+MCQHXkMK7Sern1WqX15CZXlmQk
  124. -----END RSA PRIVATE KEY-----" > /etc/openvpn/keys/client_1.key
  125.  
  126.  
  127. echo "-----BEGIN CERTIFICATE-----
  128. MIIDTzCCArigAwIBAgIJAPSNUoN3JE3uMA0GCSqGSIb3DQEBBQUAMHkxCzAJBgNV
  129. BAYTAlJVMQ4wDAYDVQQIEwVLaXJvdjEOMAwGA1UEBxMFS2lyb3YxEjAQBgNVBAoT
  130. CVpBTyBSZWxheDEVMBMGA1UEAxMMWkFPIFJlbGF4IENBMR8wHQYJKoZIhvcNAQkB
  131. FhBnZXNjaGVpdEBsaXN0LnJ1MB4XDTEwMDExNTA4NTUzN1oXDTIwMDExMzA4NTUz
  132. N1oweTELMAkGA1UEBhMCUlUxDjAMBgNVBAgTBUtpcm92MQ4wDAYDVQQHEwVLaXJv
  133. djESMBAGA1UEChMJWkFPIFJlbGF4MRUwEwYDVQQDEwxaQU8gUmVsYXggQ0ExHzAd
  134. BgkqhkiG9w0BCQEWEGdlc2NoZWl0QGxpc3QucnUwgZ8wDQYJKoZIhvcNAQEBBQAD
  135. gY0AMIGJAoGBAM0IDpS8lqAxqmztsu1jnxUHTTFVJplpafwHJI4kLPKXhmyPeKYz
  136. PBo90h2lbMsMcywd5e0KUHJ7jkuU0ipAjCjyiznl6v0BEIxfgAJljZ9+ukeuGiCz
  137. ubM9kfV3Ul1LnIWTL0fImA0OCHdX27x5cv60XDCEPrycPMRyTqdXwiFfAgMBAAGj
  138. gd4wgdswHQYDVR0OBBYEFPlD4Dwx6kf5bcSfQNVryJAPFuxIMIGrBgNVHSMEgaMw
  139. gaCAFPlD4Dwx6kf5bcSfQNVryJAPFuxIoX2kezB5MQswCQYDVQQGEwJSVTEOMAwG
  140. A1UECBMFS2lyb3YxDjAMBgNVBAcTBUtpcm92MRIwEAYDVQQKEwlaQU8gUmVsYXgx
  141. FTATBgNVBAMTDFpBTyBSZWxheCBDQTEfMB0GCSqGSIb3DQEJARYQZ2VzY2hlaXRA
  142. bGlzdC5ydYIJAPSNUoN3JE3uMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
  143. gYEAPbgQ6mcNHS+ekXWe+/dphADevtrRDqAAo2ujGbn6KXJH9oeyvHfOXA83aS1g
  144. BcGWKUIcn8SU6Vh1IHq6y31VZdBDNf5KTuavYN+ZVYWQnkXTFlsW0hgQChwqboxJ
  145. hf8GtusOjp7AoId/sR9HRtaXThOA0Pc5cV0sxws7gdN3IPg=
  146. -----END CERTIFICATE-----" > /etc/openvpn/keys/ca.crt
  147.  
  148.  
  149. openvpn --config /etc/openvpn/client.conf --daemon --log /tmp/openvpn.status
  150. brctl addif eth0 tap0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top