Documentazione online - Internet via satellite ONE WAY - Imposta VPN linux
***********************************************************************
*** DOCUMENTAZIONE PER LA CONFIGURAZIONE DEL COLLEGAMENTO VPN-InterNetCon ***
*** Linux ***
*** Made By Marius Lazaroi (lmarius@elcom.ro) ***
***********************************************************************
Qui potete trovare la versione testo della documentazione.
Per la configurazione VPN su Linux occorrono i pacchi:
ppp-mppe-2.4.0-4.i386.rpm
pptp-linux-1.0.3-1.i386.rpm
( per RedHat) o sorse per altri sistemi.
si installano i due pacchi con:
rpm -i --force ppp-mppe-2.4.0-4.i386.rpm
si
rpm -i pptp-linux-1.0.3-1.i386.rpm
Dopo l'installazione si va alla configurazione
[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] --- --- si sostituisce con il nome del tunnel
Server IP: 1.1.1.1 --- si sostituisce con l'indirizzo del serverVPN
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 - se inlocuieste cu utilizatorul pe care l-ati primit
Remote Name [PPTP]: 1.1.1.1 - se inlocuieste cu adresa serverului de VPN
Adding test - 1.1.1.1 - username - test
nel caso in cui ottenete un errore come:
Insecure dependency in open while running with -T switch
at /usr/sbin/pptp-command line 181, STDIN line 8.
si modifica il file /usr/sbin/pptp-command e si mette via lo switch- -T dalla prima linea
#!/usr/bin/perl -wT
Si riprende la configurazione dall'inizio:
[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/]#
Si modifica il file /etc/ppp/options e si impostano le seguenti opzioni:
lock
debug
nodetach
require-pap
Si modifica il file /etc/ppp/pap-secrets si lascia solo la seguente linea nel file
username * secrets *
in questo momento la configurazione e' pronta e si va all'inizio del collegamento VPN
[root@test/]# pptp-command start default
e si realizza il collegamento
Dopo il collegamento si deve modificare la tabella perche' tutti i servizi del collegamento funzionino bene.
tutto questo si pou' mettere su /etc/ppp/ip-up.local si /etc/ppp/ip-down.local
/etc/ppp/ip-up.local
#!/bin/bash
/sbin/route add -net 1.1.1.0/24 gw localgw --- unde 1.1.1.0.24 dove 1.1.1.0.24 e' la classe del server VPN e localgw e' l'indirizzo gateway local prima del collegamento
/sbin/route del default
/sbin/route add default gw ppp0addr - ppp0addr adresa care se primeste pe legatura ppp dupa conectare la VPN
Ringraziamo Marius Lazaroi per il suo aiuto
|