Salut les amis,
Dans un premier temps j'ai deux postes (un serveur ubuntu et un client xp relier
par un câble croisé).j'ai installé openswan et le package xl2tpd pour l'authentification
de mes clients et bien entendu le chiffrement des paquets se fera par la methode psk.
Sur mon client xp tous les paramétres sont en place c'est j'ai crée une nouvelle connexion vpn et j'ai activé les protocoles CHAP,MSCHAP et autres.
j'ai lu des tutos et howto sur le net,mais ils ont des configs pour les grands réseau,
or moi j'ai pour l'instant besoin d'un truc en local.c'est le fichier
Code : Sélectionner tout - Visualiser dans une fenêtre à part
 /etc/xl2tpd/xl2tpd.conf
qui me parait le plus complexe car il posséde trop de ligne
de config.
Deja je n'arrive pas à demarrer ipsec car lorsque je fais :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
 invoke-rc.d ipsec start
on me renvoie le message :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
ipsec_setup: (/etc/ipsec.conf, line 27) parameter is not within a section -- `start' aborted
invoke-rc.d: initscript ipsec, action "start" failed.
et je ne sais quoi modifier a la ligne 27.
SVP les amis si quequ'un a deja fais une pareil config qu'il me passe ces sources
même si c'est avec un autre logiciel (strongswan ,openvpn,etc...)
A defaut essayons de voir mes configs,je vous passe les fichiers les
plus importants :

ipsec.conf

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
version 2.0     # conforms to second version of ipsec.conf specification
 
# basic configuration
config setup
        # plutodebug / klipsdebug = "all", "none" or a combation from below:
        # "raw crypt parsing emitting control klips pfkey natt x509 private"
        # eg: plutodebug="control parsing"
        #
        # ONLY enable plutodebug=all or klipsdebug=all if you are a developer !!
        #
        # NAT-TRAVERSAL support, see README.NAT-Traversal
        nat_traversal=yes
 virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12
        #
        # enable this if you see "failed to find any available worker"
        nhelpers=0
 
# Add connections here
 conn L2TP-PSK
authby=secret
pfs=no
rekey=no
keyingtries=0
left=192.168.1.64    # ipserveur
leftprotoport=17/1701
leftsubnet=192.168.1.0/24
right= 192.168.1.65   # ipclient
# right=%any
#rightsubnet=vhost:%no,%priv
#rightprotoport=17/%any
auto=add
# sample VPN connections, see /etc/ipsec.d/examples/
#Disable Opportunistic Encryption
include /etc/ipsec.d/examples/no_oe.conf
ipsec.secrets

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
# RCSID $Id: ipsec.secrets.proto,v 1.3.6.1 2005-09-28 13:59:14 paul Exp $
# This file holds shared secrets or RSA private keys for inter-Pluto
# authentication.  See ipsec_pluto(8) manpage, and HTML documentation.
 
# RSA private key for this host, authenticating it to any other host
# which knows the public part.  Suitable public keys, for ipsec.conf, DNS,
# or configuration of other implementations, can be extracted conveniently
# with "ipsec showhostkey"
 192.168.1.64 192.168.1.65: PSK "secret partagé" # ipserveur   ipclient
/etc/ppp/chap.secrets
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
 
  landry * "landry" 192.168.1.65/24
/etc/xl2tpd/xl2tpd.conf (désolé pour la longueur du fichier )

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
 ; [global]                                                              ; Global parameters:
; port = 1701                                                   ; * Bind to port 1701
; auth file = /etc/l2tpd/l2tp-secrets   ; * Where our challenge secrets are
; access control = yes                                  ; * Refuse connections without IP match
; rand source = dev                     ; Source for entropy for random
;                                       ; numbers, options are:
;                                       ; dev - reads of /dev/urandom
;                                       ; sys - uses rand()
;                                       ; egd - reads from egd socket
;                                       ; egd is not yet implemented
;
; [lns default]                                                 ; Our fallthrough LNS definition
; exclusive = no                                                ; * Only permit one tunnel per host
 ip range = 192.168.1.65-192.168.1.66   ; * Allocate from this IP range
; no ip range = 192.168.0.3-192.168.0.9 ; * Except these hosts
; ip range = 192.168.0.5                                ; * But this one is okay
; ip range = lac1-lac2                                  ; * And anything from lac1 to lac2's IP
c1 to lac2's IP
; lac = 192.168.1.4 - 192.168.1.8               ; * These can connect as LAC's
; no lac = untrusted.marko.net                  ; * This guy can't connect
; hidden bit = no                                               ; * Use hidden AVP's?
; local ip = 192.168.1.2                                ; * Our local IP to use
; length bit = yes                                              ; * Use length bit in payload?
 require chap = yes                                     ; * Require CHAP auth. by peer
 refuse pap = yes                                               ; * Refuse PAP authentication
; refuse chap = no                                              ; * Refuse CHAP authentication
; refuse authentication = no                    ; * Refuse authentication altogether
 require authentication = yes                   ; * Require peer to authenticate
; unix authentication = no                              ; * Use /etc/passwd for auth.
; name = myhostname                                             ; * Report this as our hostname
ppp debug = yes                                                ; * Turn on PPP debugging
 pppoptfile = /etc/ppp/options.l2tpd.lns        ; * ppp options file
; call rws = 10                                                 ; * RWS for call (-1 is valid)
; tunnel rws = 4                                                ; * RWS for tunnel (must be > 0)
; flow bit = yes                                                ; * Include sequence numbers
; challenge = yes                                               ; * Challenge authenticate peer ;
;
; [lac marko]                                                   ; Example VPN LAC definition
; lns = lns.marko.net                                   ; * Who is our LNS?
; lns = lns2.marko.net                                  ; * A backup LNS (not yet used)
; redial = yes                                                  ; * Redial if disconnected?
; redial timeout = 15                                   ; * Wait n seconds between redials
en redials
; max redials = 5                                               ; * Give up after n consecutive failures
; hidden bit = yes                                              ; * User hidden AVP's?
; local ip = 192.168.1.1                                ; * Force peer to use this IP for us
; remote ip = 192.168.1.2                               ; * Force peer to use this as their IP
; length bit = no                                               ; * Use length bit in payload?
; require pap = no                                              ; * Require PAP auth. by peer
; require chap = yes                                    ; * Require CHAP auth. by peer
; refuse pap = yes                                              ; * Refuse PAP authentication
; refuse chap = no                                              ; * Refuse CHAP authentication
; refuse authentication = no                    ; * Refuse authentication altogether
; require authentication = yes 
; name = marko                                                  ; * Report this as our hostname
; ppp debug = no                                                ; * Turn on PPP debugging
; pppoptfile = /etc/ppp/options.l2tpd.marko     ; * ppp options file for this lac
; call rws = 10                                                 ; * RWS for call (-1 is valid)
; tunnel rws = 4                                                ; * RWS for tunnel (must be > 0)
; flow bit = yes                                                ; * Include sequence numbers
; challenge = yes                                               ; * Challenge authenticate peer
;
; [lac cisco]                                                   ; Another quick LAC
; lns = cisco.marko.net                                 ; * Required, but can take from default
; require authentication = yes
SVP les amis un coup de main