Rebooter VPN linux - Documentation en ligne - Internet par satellite
***********************************************************************
*** DOCUMENTATION DE CONFIGURATION POUR CONNEXION VPN- InterNetCon ***
*** Linux ***
*** Made By Marius Lazaroi (lmarius@elcom.ro) ***
***********************************************************************
Cliquez ici et vous pouvez télécharger la version texte de cette documentation.
Pour la configuration VPN sur Linux il vous faut les paquets suivants:
ppp-mppe-2.4.0-4.i386.rpm
pptp-linux-1.0.3-1.i386.rpm
( pour RedHat) ou source pour d’autres systèmes.
On installe les deux paquets avec:
rpm -i --force ppp-mppe-2.4.0-4.i386.rpm
si
rpm -i pptp-linux-1.0.3-1.i386.rpm
Après l’installation des paquets on passe à leur configuration:
[root@test]# pptp-command
1.) start
2.) stop
3.) setup
4.) quit
What task would you like to do?: 3
1.) List CHAP secrets
2.) Add a New CHAP secret
3.) Delete a CHAP secret
4.) List PPTP Tunnels
5.) Add a NEW PPTP Tunnel
6.) Delete a PPTP Tunnel
7.) Configure resolv.conf
8.) Select a default tunnel
9.) Quit
?: 5
Add a NEW PPTP Tunnel.
1.) Other
Which configuration would you like to use?: 1
Tunnel Name: [test] --- se inlocuieste cu ce nume doriti dvs pentru tunel
Server IP: 1.1.1.1 --- se inlocuieste cu adresa serverului de VPN
What route(s) would you like to add when the tunnel comes up?
This is usually a route to your internal network behind the PPTP server.
You can use TUNNEL_DEV and DEF_GW as in /etc/pptp.d/ config file
TUNNEL_DEV is replaced by the device of the tunnel interface.
DEF_GW is replaced by the existing default gateway.
The syntax to use is the same as the route(8) command.
Enter a blank line to stop.
route:
Local Name and Remote Name should match a configured CHAP secret.
Local Name is probably your NT domain\username.
NOTE: Any backslashes (\) must be doubled (\\).
Local Name: username - on le remplace avec le nom d’utilisateur que vous avez reçu
Remote Name [PPTP]: 1.1.1.1 - on le remplace avec l’adresse du serveur de VPN
Adding test - 1.1.1.1 - username - test
Au cas où il y a une erreur du type
Insecure dependency in open while running with -T switch
at /usr/sbin/pptp-command line 181, STDIN line 8.
On édite le fichier /usr/sbin/pptp-command et on enlève le commutateur T de la première ligne
#!/usr/bin/perl -wT
On reprend la configuration dès le début:
[root@test]# pptp-command
1.) start
2.) stop
3.) setup
4.) quit
What task would you like to do?: 3
1.) List CHAP secrets
2.) Add a New CHAP secret
3.) Delete a CHAP secret
4.) List PPTP Tunnels
5.) Add a NEW PPTP Tunnel
6.) Delete a PPTP Tunnel
7.) Configure resolv.conf
8.) Select a default tunnel
9.) Quit
?: 5
Add a NEW PPTP Tunnel.
1.) Other
Which configuration would you like to use?: test
Argument "test" isn't numeric in numeric eq (==) at /usr/sbin/pptp-command line 350, STDIN line 3.
Use of uninitialized value in hash element at /usr/sbin/pptp-command line 372, STDIN line 3.
Use of uninitialized value in hash element at /usr/sbin/pptp-command line 372, STDIN line 3.
Use of uninitialized value in hash element at /usr/sbin/pptp-command line 373, STDIN line 3.
Use of uninitialized value in array dereference at /usr/sbin/pptp-command line 373, STDIN line 3.
Local Name and Remote Name should match a configured CHAP secret.
Local Name is probably your NT domain\username.
NOTE: Any backslashes (\) must be doubled (\\).
Local Name: username
Remote Name [PPTP]:
[root@xantic ppp]# pptp-command
1.) start
2.) stop
3.) setup
4.) quit
What task would you like to do?: 3
1.) List CHAP secrets
2.) Add a New CHAP secret
3.) Delete a CHAP secret
4.) List PPTP Tunnels
5.) Add a NEW PPTP Tunnel
6.) Delete a PPTP Tunnel
7.) Configure resolv.conf
8.) Select a default tunnel
9.) Quit
?: 5
Add a NEW PPTP Tunnel.
1.) Other
Which configuration would you like to use?: 1
Tunnel Name: test
Server IP: 1.1.1.1
What route(s) would you like to add when the tunnel comes up?
This is usually a route to your internal network behind the PPTP server.
You can use TUNNEL_DEV and DEF_GW as in /etc/pptp.d/ config file
TUNNEL_DEV is replaced by the device of the tunnel interface.
DEF_GW is replaced by the existing default gateway.
The syntax to use is the same as the route(8) command.
Enter a blank line to stop.
route:
Local Name and Remote Name should match a configured CHAP secret.
Local Name is probably your NT domain\username.
NOTE: Any backslashes (\) must be doubled (\\).
Local Name: username
Remote Name [PPTP]: 1.1.1.1
Adding test - 1.1.1.1 - username - 1.1.1.1
Added tunnel test
1.) List CHAP secrets
2.) Add a New CHAP secret
3.) Delete a CHAP secret
4.) List PPTP Tunnels
5.) Add a NEW PPTP Tunnel
6.) Delete a PPTP Tunnel
7.) Configure resolv.conf
8.) Select a default tunnel
9.) Quit
?: 8
1.) default
2.) star
3.) uicont
4.) test
5.) new-tunel
6.) cancel
Which tunnel do you want to be the default?: 4
1.) List CHAP secrets
2.) Add a New CHAP secret
3.) Delete a CHAP secret
4.) List PPTP Tunnels
5.) Add a NEW PPTP Tunnel
6.) Delete a PPTP Tunnel
7.) Configure resolv.conf
8.) Select a default tunnel
9.) Quit
?: q
[root@test/]#
On édite le fichier /etc/ppp/options et on introduit les options suivantes:
lock
debug
nodetach
require-pap
On édite le fichier /etc/ppp/pap-secrets et on laisse seulement la ligne suivante dans le fichier
username * secrets *
En ce moment la configuration est finie et on peut passer au reboote de la connexion de VPN
[root@test/]# pptp-command start default
et se réalise la connexion.
Après la réalisation de la connexion, on doit modifier le tableau de routage
afin que tous les services fonctionnent de manière adéquate sur cette connexion.
Tous ces chose, on peut les mettre en /etc/ppp/ip-up.local et en /etc/ppp/ip-down.local
/etc/ppp/ip-up.local
#!/bin/bash
/sbin/route add -net 1.1.1.0/24 gw localgw --- où 1.1.1.0.24 est la classe de laquelle fait partie le serveur de vpn et localgw est l’adresse de gateway local avant de se connecter
/sbin/route del default
/sbin/route add default gw ppp0addr - ppp0addr address received on ppp link after VPN establishment
Nous remercions M. Marius Lazaroi pour le soutient qu’il nous a accordé à cette documentation.
|