Page -> Diferencia entre revisiones de «PPTP-Ubuntu» Vistas :  Página  Discusión  Ver fuente  Historial 

De DIT-CDC

(Ubuntu 6.10)
(Ubuntu 6.10)
Línea 64: Línea 64:
 
<li>pon-dit:</li>
 
<li>pon-dit:</li>
  
  #!/bin/bash
+
#!/bin/bash
  ROUTER=`route -n | grep "^0.0.0.0" | awk '{printf $2}'`
+
ROUTER=`route -n | grep "^0.0.0.0" | awk '{printf $2}'`
  echo "ROUTER=$ROUTER"
+
echo "ROUTER=$ROUTER"
  sleep 10
+
sleep 10
  pon DIT
+
pon DIT
  echo route add -host 138.4.5.200/32 gw $ROUTER
+
echo route add -host 138.4.5.200/32 gw $ROUTER
  route add -host 138.4.5.200/32 gw $ROUTER
+
route add -host 138.4.5.200/32 gw $ROUTER
  sleep 5
+
sleep 5
  echo route add -net  138.4.0.0/16 gw 138.4.5.199
+
echo route add -net  138.4.0.0/16 gw 138.4.5.199
  route add -net  138.4.0.0/16 gw 138.4.5.199
+
route add -net  138.4.0.0/16 gw 138.4.5.199
  
 
<li>poff-dit:</li>
 
<li>poff-dit:</li>
  
  #!/bin/bash
+
#!/bin/bash
  ROUTER=`route -n | grep "^0.0.0.0" | awk '{printf $2}'`
+
ROUTER=`route -n | grep "^0.0.0.0" | awk '{printf $2}'`
  poff DIT
+
poff DIT
  route delete -host 138.4.5.200/32 gw $ROUTER
+
route delete -host 138.4.5.200/32 gw $ROUTER
  route delete -net  138.4.0.0/16 gw 138.4.5.199
+
route delete -net  138.4.0.0/16 gw 138.4.5.199
  
 
</ul>
 
</ul>

Revisión de 13:11 31 mar 2007

Configuración de túneles PPTP en Ubuntu


Ubuntu 6.06

En construcción

Ubuntu 6.10

Existe un fallo conocido en Ubuntu 6.10 que impide que funcionen correctamente los túneles.

Para solucionarlo hay que:

  • Bajarse la una versión anterior de ppp (2.4.3) de aquí
  • Instalarla mediante:
 dpkg -i ppp_2.4.3-20050321+2ubuntu1.1_i386.deb

A partir de aquí en procedimiento es:

  • Instalar pptp-linux
  •  apt-get install pptp-linux
    
  • Instalar pptpconfig
    1. Añadir la fuente de pptpconfig a /etc/apt/sources.list:
    2.  echo -e '\n# PPTP GUI\ndeb http://quozl.netrek.org/pptp/pptpconfig ./' >> /etc/apt/sources.list
      
    3. actualizar:
    4.      apt-get update
      
    5. instalar PPTP Client GUI:
    6.      apt-get install pptpconfig
      
  • Arrancar pptpconfig:
  •  > pptpconfig
    
  • Configurar una conexión con los parámetros siguientes:
  •  Solapa Server:
     Name: DIT
     Server: rpv.dit.upm.es
     Domain:
     Username: fulanito
     Password: clavedefulanito
    
     Solapa Encryption:
     Seleccionar "Require Microsoft Point-to-Point (MPPE)"
    
  • Pulsar el botón "Add" y salir del programa (Nota: por los fallos mencionados de ppp en Ubuntu 6.10, no se puede arrancar y parar los túneles desde pptpconfig.
  • Crear dos scripts llamados "pon-dit" y "poff-dit" con el contenido siguiente:
    • pon-dit:
    • #!/bin/bash
      ROUTER=`route -n | grep "^0.0.0.0" | awk '{printf $2}'`
      echo "ROUTER=$ROUTER"
      sleep 10
      pon DIT
      echo route add -host 138.4.5.200/32 gw $ROUTER
      route add -host 138.4.5.200/32 gw $ROUTER
      sleep 5
      echo route add -net  138.4.0.0/16 gw 138.4.5.199
      route add -net  138.4.0.0/16 gw 138.4.5.199
      
    • poff-dit:
    • #!/bin/bash
      ROUTER=`route -n | grep "^0.0.0.0" | awk '{printf $2}'`
      poff DIT
      route delete -host 138.4.5.200/32 gw $ROUTER
      route delete -net  138.4.0.0/16 gw 138.4.5.199
      
  • Dar permisos de ejecución a los scripts:
  •  chmod +x pon-dit poff-dit
    





Referencias




Navegación
Enlaces externos
Herramientas personales