{"id":102,"date":"2006-12-12T22:14:35","date_gmt":"2006-12-13T03:14:35","guid":{"rendered":"http:\/\/log.cagadaga.com\/?page_id=102"},"modified":"2006-12-12T22:16:14","modified_gmt":"2006-12-13T03:16:14","slug":"openvpn-p-t-p","status":"publish","type":"post","link":"https:\/\/log.cagadaga.com\/?p=102","title":{"rendered":"OpenVPN p-t-p"},"content":{"rendered":"<p align=\"justify\">Primero haremos la instalaci\u00c3\u00b3n de de la libreria lzo<br \/>\n# tar -zxvf lzo-2.00.tar.gz<br \/>\n# cd lzo-2.00<br \/>\n# .\/configure &#8211;prefix=\/usr\/local\/lzo<br \/>\n# time make<br \/>\n# time make install<br \/>\ny listo si no marca ning\u00c3\u00ban error continuemos con la isntalaci\u00c3\u00b3n de openvpn<\/p>\n<p>Ahora instalamos OpenVPN<\/p>\n<p># tar -zxvf \/home\/xanatos\/bi\/openvpn-2.0.9.tar.gz<br \/>\n# apt-get install libssl-dev<br \/>\n#  .\/configure &#8211;prefix=\/usr\/local\/openvpn  &#8211;with-lzo-headers=\/usr\/local\/lzo\/include\/lzo\/ &#8211;with-lzo-lib=\/usr\/local\/lzo\/lib\/<br \/>\n# time make # time make install<\/p>\n<p>Si no marca error podr\u00c3\u00a9mos continuar.<\/p>\n<p>Para que funcione solo tenemos que saber nuestras direcciones IP p\u00c3\u00bablicas.<\/p>\n<p># export PATH=$PATH:\/usr\/local\/openvpn\/sbin\/<br \/>\n# openvpn &#8211;genkey &#8211;secret llave.key<\/p>\n<p>Copiamos neustra llave a nuestro cliente<\/p>\n<p>Ahora tendremos que hacer lo siguiente para dejar funcionando nuestra vpn punto a punto<\/p>\n<p># openvpn &#8211;remote 189.169.60.161 &#8211;dev tun0 &#8211;ifconfig 10.0.2.1 10.0.2.2 &#8211;secret cucea.key  &#8211;daemon<br \/>\n# openvpn &#8211;remote 148.202.23.26 &#8211;dev tun0 &#8211;ifconfig 10.0.2.2 10.0.2.1 &#8211;secret \/usr\/local\/src\/openvpn-2.0.9\/cucea.key &#8211;daemon<\/p>\n<p>si nos damos cuenta en la primera linea en el parametro ifconfig ponemos la 10.0.2.1 y la 10.0.2.2 y la primera es la ip uno de la vpn y la seguna es el segundo nodo en la vpn y en la segunda linea lo hacemos de manera inversa.<\/p>\n<p>Ese es mi lado del cliente.<\/p>\n<p># ifconfig tun0<br \/>\ntun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00<br \/>\ninet addr:10.0.2.2  P-t-P:10.0.2.1  Mask:255.255.255.255<br \/>\nUP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1<br \/>\nRX packets:0 errors:0 dropped:0 overruns:0 frame:0<br \/>\nTX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br \/>\ncollisions:0 txqueuelen:100<br \/>\nRX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)<\/p>\n<p>Mi lado del Servidor<\/p>\n<p># ifconfig tun0<br \/>\ntun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00<br \/>\ninet addr:10.0.2.1  P-t-P:10.0.2.2  Mask:255.255.255.255<br \/>\nUP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1<br \/>\nRX packets:3 errors:0 dropped:0 overruns:0 frame:0<br \/>\nTX packets:3 errors:0 dropped:0 overruns:0 carrier:0<br \/>\ncollisions:0 txqueuelen:100<br \/>\nRX bytes:252 (252.0 b)  TX bytes:252 (252.0 b)<\/p>\n<p>El que nos interesa es el que dice p-t-p ese es nuestro lado a alcanzar en la vpn lo podemos provar con un simple ping<\/p>\n<p>Del lado del servidor.<\/p>\n<p># ping 10.0.2.2<br \/>\nPING 10.0.2.2 (10.0.2.2) 56(84) bytes of data.<br \/>\n64 bytes from 10.0.2.2: icmp_seq=1 ttl=64 time=52.3 ms<br \/>\n64 bytes from 10.0.2.2: icmp_seq=2 ttl=64 time=44.0 ms<br \/>\n64 bytes from 10.0.2.2: icmp_seq=3 ttl=64 time=40.9 ms<\/p>\n<p>Del lado de mi cliente<\/p>\n<p># ping 10.0.2.1<br \/>\nPING 10.0.2.1 (10.0.2.1) 56(84) bytes of data.<br \/>\n64 bytes from 10.0.2.1: icmp_seq=1 ttl=64 time=45.2 ms<br \/>\n64 bytes from 10.0.2.1: icmp_seq=2 ttl=64 time=43.6 ms<br \/>\n64 bytes from 10.0.2.1: icmp_seq=3 ttl=64 time=43.4 ms<\/p>\n<p>Como resultado pues es satisfactorio ya esta lista nuestra vpn funcionando p-t-p<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Primero haremos la instalaci\u00c3\u00b3n de de la libreria lzo # tar -zxvf lzo-2.00.tar.gz # cd lzo-2.00 # .\/configure &#8211;prefix=\/usr\/local\/lzo # time make # time make install y listo si no marca ning\u00c3\u00ban error continuemos con la isntalaci\u00c3\u00b3n de openvpn Ahora instalamos OpenVPN # tar -zxvf \/home\/xanatos\/bi\/openvpn-2.0.9.tar.gz # apt-get install libssl-dev # .\/configure &#8211;prefix=\/usr\/local\/openvpn &#8211;with-lzo-headers=\/usr\/local\/lzo\/include\/lzo\/ &#8211;with-lzo-lib=\/usr\/local\/lzo\/lib\/<span class=\"post-excerpt-end\">&hellip;<\/span><\/p>\n<p class=\"more-link\"><a href=\"https:\/\/log.cagadaga.com\/?p=102\" class=\"themebutton\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-102","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=\/wp\/v2\/posts\/102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=102"}],"version-history":[{"count":0,"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=\/wp\/v2\/posts\/102\/revisions"}],"wp:attachment":[{"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}