IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Sécurité Discussion :

Mise en place d'un tunnel VPN openswan


Sujet :

Sécurité

  1. #1
    Membre à l'essai
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Points : 13
    Points
    13
    Par défaut Mise en place d'un tunnel VPN openswan
    Bonjour tout le monde,
    je vous sollicite aujourd'hui pour un problème concernant la mise en place d'un tunnel VPN openswan. n'ayant aucune connaissance sur la mise en place de vpn sous linux, j'ai effectué pendant des semaines des recherches et des tests et voici ce que j'ai réussi à faire :

    j'ai monté deux VM debian sarge version 5.0 :

    Serveur
    hostname=serveur
    eth0=192.168.232.150
    netmask=255.255.255.0
    eth1=10.0.0.150
    netmask=255.0.0.0

    Client
    hostname=client
    eth0=192.168.232.100
    netmask=255.255.255.0

    sur les deux VM j'ai installé openswan avec les options par défaut via la commande apt-get install openswan

    j'ai créé sur chaque VM un certificat avec clé privée(je suis aussi novice dans le domaine du openssl jusqu'à encore quelques jours) que j'ai nommé openswanserveur.crt et openswanserveur.key que j'ai placé respectivement dans les répertoires /etc/ipsec.d/certs et /etc/ipsec.d/private et j'ai fait de même avec le client en replaçant le mot serveur par client

    j'ai configuré le fichier /etc/ipsec.secrets pour qu'il utilise la clé privée sur chaque machine:
    : RSA /etc/ipsec.d/private/openswanserveur.key et j'ai fait de meme sur le client et j'ai copié ces fichiers crt sur les deux VM.

    j'ai configuré les options suivantes :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    echo 0 > /proc/sys/net/ipv4/conf/*/accept_redirects
    echo 0 > /proc/sys/net/ipv4/conf/*/send_redirects
    j'ai exécuté la commande suivante :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    sysctl -w net.ipv4.conf.all.accept_redirects="0"
    j'ai modifié le fichier /etc/sysctl.conf en activant les options suivantes :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    net.ipv4.ip_forward = 1
    net.ipv4.conf.default.rp_filter = 0
    net.ipv4.conf.all.accept_redirects = 0
    net.ipv4.conf.all.send_redirects = 0
    net.ipv4.icmp_ignore_bogus_error_responses = 1
    net.ipv4.conf.all.log_martians = 0
    j'ai configuré finalement le fichier ipsec.conf sur les deux VM de la façon suivante :

    #Serveur
    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
    config setup
             nat_traversal=yes
             virtual_private=%v4:10.0.0.0/8
             interfaces="ipsec0=eth0"
             klipsdebug=none
     
    conn block
             auto=ignore
    conn private
             auto=ignore
    conn private-or-clear
             auto=ignore
    conn clear-or-private
             auto=ignore
    conn clear
             auto=ignore
    conn packetdefault
             auto=ignore
     
    conn maman
             left=192.168.232.100
             leftcert=/etc/ipsec.d/certs/openswanclient.crt
             leftrsasigkey=%cert
             right=192.168.232.150
             rightcert=/etc/ipsec.d/certs/openswanserveur.crt
             rightsubnet=10.0.0.0/8
             rightrsasigkey=%cert
             authby=rsasig
             compress=no
             disablearrivalcheck=no
             keyingtries=3
             keylife=24h
             ikelifetime=5h
             auto=start
     
    include /etc/ipsec.d/examples/no_oe.conf


    #Client
    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
    config setup
             nat_traversal=yes
     
    conn block
             auto=ignore
    conn private
             auto=ignore
    conn private-or-clear
             auto=ignore
    conn clear-or-private
             auto=ignore
    conn clear
             auto=ignore
    conn packetdefault
             auto=ignore
     
    conn maman
             left=192.168.232.100
             leftcert=/etc/ipsec.d/certs/openswanclient.crt
             leftrsasigkey=%cert
             leftprotoport=17/1701
             right=192.168.232.150
             rightcert=/etc/ipsec.d/certs/openswanserveur.crt
             rightsubnet=10.0.0.0/8
             rightrsasigkey=%cert
             authby=rsasig
             type=tunnel
             auto=start
     
    include /etc/ipsec.d/examples/no_oe.conf
    au final quand je lance la commande suivante :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    /etc/init.d/ipsec start ou ipsec setup --start
    j'ai ça dans les logs /var/log/auth.log

    #Client

    Aug 31 18:32:48 Client ipsec__plutorun: Starting Pluto subsystem...
    Aug 31 18:32:49 Client pluto[3489]: Starting Pluto (Openswan Version 2.4.12 LDAP_V3 PLUTO_SENDS_VENDORID PLUTO_USES_KEYRR; Vendor ID OE`lPH|Vbpuu)
    Aug 31 18:32:49 Client pluto[3489]: Setting NAT-Traversal port-4500 floating to on
    Aug 31 18:32:49 Client pluto[3489]: port floating activation criteria nat_t=1/port_fload=1
    Aug 31 18:32:49 Client pluto[3489]: including NAT-Traversal patch (Version 0.6c)
    Aug 31 18:32:49 Client pluto[3489]: ike_alg_register_enc(): Activating OAKLEY_AES_CBC: Ok (ret=0)
    Aug 31 18:32:49 Client pluto[3489]: starting up 1 cryptographic helpers
    Aug 31 18:32:49 Client pluto[3489]: started helper pid=3496 (fd:6)
    Aug 31 18:32:49 Client pluto[3489]: Using NETKEY IPsec interface code on 2.6.26-2-686
    Aug 31 18:32:52 Client pluto[3489]: Changing to directory '/etc/ipsec.d/cacerts'
    Aug 31 18:32:52 Client pluto[3489]: Changing to directory '/etc/ipsec.d/aacerts'
    Aug 31 18:32:52 Client pluto[3489]: Changing to directory '/etc/ipsec.d/ocspcerts'
    Aug 31 18:32:52 Client pluto[3489]: Changing to directory '/etc/ipsec.d/crls'
    Aug 31 18:32:52 Client pluto[3489]: Warning: empty directory
    Aug 31 18:32:52 Client pluto[3489]: loaded host cert file '/etc/ipsec.d/certs/openswanclient.crt' (1127 bytes)
    Aug 31 18:32:52 Client pluto[3489]: loaded host cert file '/etc/ipsec.d/certs/openswanserveur.crt' (1367 bytes)
    Aug 31 18:32:52 Client pluto[3489]: added connection description "maman"
    Aug 31 18:32:52 Client pluto[3489]: listening for IKE messages
    Aug 31 18:32:52 Client pluto[3489]: adding interface eth0/eth0 192.168.232.100:500
    Aug 31 18:32:52 Client pluto[3489]: adding interface eth0/eth0 192.168.232.100:4500
    Aug 31 18:32:52 Client pluto[3489]: adding interface lo/lo 127.0.0.1:500
    Aug 31 18:32:52 Client pluto[3489]: adding interface lo/lo 127.0.0.1:4500
    Aug 31 18:32:52 Client pluto[3489]: adding interface lo/lo ::1:500
    Aug 31 18:32:52 Client pluto[3489]: loading secrets from "/etc/ipsec.secrets"
    Aug 31 18:32:52 Client pluto[3489]: loaded private key file '/etc/ipsec.d/private/openswanclient.key' (1679 bytes)
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: initiating Main Mode
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: received Vendor ID payload [Openswan (this version) 2.4.12 LDAP_V3 PLUTO_SENDS_VENDORID PLUTO_USES_KEYRR]
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: received Vendor ID payload [Dead Peer Detection]
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: received Vendor ID payload [RFC 3947] method set to=109
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: enabling possible NAT-traversal with method RFC 3947 (NAT-Traversal)
    "/var/log/auth.log" 48L, 4433C 1,1 Haut
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: transition from state STATE_MAIN_I1 to state STATE_MAIN_I2
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: STATE_MAIN_I2: sent MI2, expecting MR2
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: NAT-Traversal: Result using RFC 3947 (NAT-Traversal): no NAT detected
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: I am sending my cert
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: I am sending a certificate request
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: transition from state STATE_MAIN_I2 to state STATE_MAIN_I3
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: STATE_MAIN_I3: sent MI3, expecting MR3
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: Main mode peer ID is ID_DER_ASN1_DN: 'C=FR, ST=va voir ailleur, O=Internet Widgits Pty Ltd'
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: end certificate with identical subject and issuer not accepted
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: X.509 certificate rejected
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: transition from state STATE_MAIN_I3 to state STATE_MAIN_I4
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: STATE_MAIN_I4: ISAKMP SA established {auth=OAKLEY_RSA_SIG cipher=oakley_3des_cbc_192 prf=oakley_md5 group=modp1536}
    Aug 31 18:32:52 Client pluto[3489]: "maman" #2: initiating Quick Mode RSASIG+ENCRYPT+TUNNEL+PFS+UP {using isakmp#1}
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: ignoring informational payload, type INVALID_ID_INFORMATION
    Aug 31 18:32:52 Client pluto[3489]: "maman" #1: received and ignored informational message
    Aug 31 18:33:02 Client pluto[3489]: "maman" #1: ignoring informational payload, type INVALID_MESSAGE_ID
    Aug 31 18:33:02 Client pluto[3489]: "maman" #1: received and ignored informational message
    48,1 Bas


    #Serveur

    Aug 31 18:37:23 Serveur ipsec__plutorun: Starting Pluto subsystem...
    Aug 31 18:37:23 Serveur pluto[7735]: Starting Pluto (Openswan Version 2.4.12 LDAP_V3 PLUTO_SENDS_VENDORID PLUTO_USES_KEYRR; Vendor ID OE`lPH|Vbpuu)
    Aug 31 18:37:23 Serveur pluto[7735]: Setting NAT-Traversal port-4500 floating to on
    Aug 31 18:37:23 Serveur pluto[7735]: port floating activation criteria nat_t=1/port_fload=1
    Aug 31 18:37:23 Serveur pluto[7735]: including NAT-Traversal patch (Version 0.6c)
    Aug 31 18:37:23 Serveur pluto[7735]: ike_alg_register_enc(): Activating OAKLEY_AES_CBC: Ok (ret=0)
    Aug 31 18:37:23 Serveur pluto[7735]: starting up 1 cryptographic helpers
    Aug 31 18:37:23 Serveur pluto[7735]: started helper pid=7741 (fd:6)
    Aug 31 18:37:23 Serveur pluto[7735]: Using NETKEY IPsec interface code on 2.6.26-2-686
    Aug 31 18:37:26 Serveur pluto[7735]: Changing to directory '/etc/ipsec.d/cacerts'
    Aug 31 18:37:26 Serveur pluto[7735]: Changing to directory '/etc/ipsec.d/aacerts'
    Aug 31 18:37:26 Serveur pluto[7735]: Changing to directory '/etc/ipsec.d/ocspcerts'
    Aug 31 18:37:26 Serveur pluto[7735]: Changing to directory '/etc/ipsec.d/crls'
    Aug 31 18:37:26 Serveur pluto[7735]: Warning: empty directory
    Aug 31 18:37:26 Serveur pluto[7735]: loaded host cert file '/etc/ipsec.d/certs/openswanclient.crt' (1127 bytes)
    Aug 31 18:37:26 Serveur pluto[7735]: loaded host cert file '/etc/ipsec.d/certs/openswanserveur.crt' (1367 bytes)
    Aug 31 18:37:26 Serveur pluto[7735]: added connection description "maman"
    Aug 31 18:37:26 Serveur pluto[7735]: listening for IKE messages
    Aug 31 18:37:26 Serveur pluto[7735]: adding interface eth1/eth1 10.0.0.150:500
    Aug 31 18:37:26 Serveur pluto[7735]: adding interface eth1/eth1 10.0.0.150:4500
    Aug 31 18:37:26 Serveur pluto[7735]: adding interface eth0/eth0 192.168.232.150:500
    Aug 31 18:37:26 Serveur pluto[7735]: adding interface eth0/eth0 192.168.232.150:4500
    Aug 31 18:37:26 Serveur pluto[7735]: adding interface lo/lo 127.0.0.1:500
    Aug 31 18:37:26 Serveur pluto[7735]: adding interface lo/lo 127.0.0.1:4500
    Aug 31 18:37:26 Serveur pluto[7735]: adding interface lo/lo ::1:500
    Aug 31 18:37:26 Serveur pluto[7735]: loading secrets from "/etc/ipsec.secrets"
    Aug 31 18:37:26 Serveur pluto[7735]: loaded private key file '/etc/ipsec.d/private/openswanserveur.key' (1679 bytes)
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: initiating Main Mode
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: received Vendor ID payload [Openswan (this version) 2.4.12 LDAP_V3 PLUTO_SENDS_VENDORID PLUTO_USES_KEYRR]
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: received Vendor ID payload [Dead Peer Detection]
    "/var/log/auth.log" 48L, 4405C 1,1 Haut
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: received Vendor ID payload [RFC 3947] method set to=109
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: enabling possible NAT-traversal with method RFC 3947 (NAT-Traversal)
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: transition from state STATE_MAIN_I1 to state STATE_MAIN_I2
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: STATE_MAIN_I2: sent MI2, expecting MR2
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: NAT-Traversal: Result using RFC 3947 (NAT-Traversal): no NAT detected
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: I am sending my cert
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: I am sending a certificate request
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: transition from state STATE_MAIN_I2 to state STATE_MAIN_I3
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: STATE_MAIN_I3: sent MI3, expecting MR3
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: Main mode peer ID is ID_DER_ASN1_DN: 'C=fr, ST=client, L=client, O=Internet Widgits Pty Ltd'
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: issuer cacert not found
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: X.509 certificate rejected
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: transition from state STATE_MAIN_I3 to state STATE_MAIN_I4
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: STATE_MAIN_I4: ISAKMP SA established {auth=OAKLEY_RSA_SIG cipher=oakley_3des_cbc_192 prf=oakley_md5 group=modp1536}
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #2: initiating Quick Mode RSASIG+ENCRYPT+TUNNEL+PFS+UP {using isakmp#1}
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: ignoring informational payload, type INVALID_ID_INFORMATION
    Aug 31 18:37:27 Serveur pluto[7735]: "maman" #1: received and ignored informational message
    48,1 Bas

    et dans le fichier de log daemon.log j'ai ceci
    Aug 31 18:37:23 Serveur ipsec_setup: NETKEY on eth0 192.168.232.150/255.255.255.0 broadcast 192.168.232.255
    Aug 31 18:37:23 Serveur ipsec_setup: ...Openswan IPsec started
    Aug 31 18:37:23 Serveur ipsec_setup: Starting Openswan IPsec 2.4.12...
    Aug 31 18:37:27 Serveur ipsec__plutorun: 104 "maman" #1: STATE_MAIN_I1: initiate
    Aug 31 18:37:27 Serveur ipsec__plutorun: ...could not start conn "maman"
    840,1 Bas


    si quelqu'un pourrait m'aider ca sera vraiment trés sympa de votre part surtout que je galére depuis un certain temps dessus. si vous avez besoin d'un éclaircissement je reste à votre disposition. merci encore d'avance

  2. #2
    Membre à l'essai
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Points : 13
    Points
    13
    Par défaut
    voici le résultat de la commande ipsec verify que se soit sur le serveur ou le client:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    Client:~# ipsec verify
    Checking your system to see if IPsec got installed and started correctly:
    Version check and ipsec on-path                                 [OK]
    Linux Openswan U2.4.12/K2.6.26-2-686 (netkey)
    Checking for IPsec support in kernel                            [OK]
    NETKEY detected, testing for disabled ICMP send_redirects       [OK]
    NETKEY detected, testing for disabled ICMP accept_redirects     [OK]
    Checking for RSA private key (/etc/ipsec.secrets)               [DISABLED]
      ipsec showhostkey: no default key in "/etc/ipsec.secrets"
    Checking that pluto is running                                  [OK]
    Checking for 'ip' command                                       [OK]
    Checking for 'iptables' command                                 [OK]
    Opportunistic Encryption Support                                [DISABLED]

  3. #3
    Membre régulier
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Mars 2007
    Messages : 95
    Points : 104
    Points
    104
    Par défaut
    Bonjour,
    openswan est une obligation ?
    J'utilise Racoon mais avec des psk et non des certificats.

    Si cela peut te donner une idée.

    ++

  4. #4
    Membre à l'essai
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Points : 13
    Points
    13
    Par défaut
    on utilise déjà openvpn et on m'a demandé de trouver une autre méthode sous linux d'établir un tunnel vpn, j'ai vu qu'il y a openswan et racoon. j'ai essayé d'installer racoon c'est aussi difficile qu'openswan et personnellement je ne suis pas calé dans le domaine du vpn et des certificats, surtout qu'en plus les tutoriels sur les vpn cités ci-dessus ne sont guère trouvable sur le net.

  5. #5
    Membre régulier
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Mars 2007
    Messages : 95
    Points : 104
    Points
    104
    Par défaut
    Bonjour,
    lorsque de ma première utilisation d'ipsec, j'avais utilisé 2 vm comme toi et dans un premier temps je montais mes vpn uniquement avec les commandes setkey. ensuite toujours en psk avec racoon et pour finir avec racooon et les certificats.

    Si tu as 5 min tu peux me donner les ip sur lesquels tu fais tes tests, je te renverrai les commandes setkey. Ensuite on passera à l'utilisation de racoon. C'est sûr c'est un peu laborieux mais cela permet d'avancer étape par étape.

    Jonathan

  6. #6
    Membre à l'essai
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Points : 13
    Points
    13
    Par défaut
    merci johnjohn33 pour ta réponse et ton aide

    en fait actuellement je teste sur des VM pour le reproduire dans mon entreprise par la suite.
    pour ce qui est IP j'ai deux VM :

    VM Serveur:
    hostname=serveur
    eth0=192.168.232.150
    netmask=255.255.255.0
    eth1=10.0.0.150
    netmask=255.0.0.0

    sur le serveur j'ai fait une route entre les deux interfaces pour qu'ils puissent communiquer ensembles.

    VM Client
    hostname=client
    eth0=192.168.232.100
    netmask=255.255.255.0


    sinon dans les logs auth.log j'ai ce message :

    cannot respond to IPsec SA request because no connection is known for 10.0.0.0/8===192.168.232.150

  7. #7
    Membre régulier
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Mars 2007
    Messages : 95
    Points : 104
    Points
    104
    Par défaut
    Essayes les commandes suivantes pour voir si cela fonctionne. Ensuite tu testes avec un ping vers ton serveur et avec tcpdump tu regardes si c'est crypté.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    spdadd 192.168.232.150 192.168.232.100 any -P out ipsec
            esp/tunnel/192.168.232.150-192.168.232.100/require;
    spdadd 192.168.232.100 192.168.232.150 any -P in ipsec
            esp/tunnel/192.168.232.100-192.168.232.150/require;
    add 192.168.232.100 192.168.232.150
            esp 300 -m tunnel -E 3des-cbc "123456789012123456789012" -A hmac-sha1 "HAMNtunnelHAMNtunnel";
    add 192.168.232.150 192.168.232.100
            esp 300 -m tunnel -E 3des-cbc "123456789012123456789012" -A hmac-sha1 "HAMNtunnelHAMNtunnel";

  8. #8
    Membre à l'essai
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Points : 13
    Points
    13
    Par défaut
    quel package debian je dois installer pour utiliser la commande spdadd? Merci

  9. #9
    Membre à l'essai
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Points : 13
    Points
    13
    Par défaut
    sinon j'ai vu sur le net que la dernière erreur que j'ai eu est due au fait que le serveur et le client sont sur le même réseau 192.168.232.0/24 e qu'il faudrait avoir plutôt trois VM pour simuler un réseau avec des adresses IP dans des réseaux différents du genre


    Client passerelle serveur
    10.0.0.X 10.0.0.Y/193.190.0.Z 193.190.0.W/192.168.0.V

  10. #10
    Membre régulier
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Mars 2007
    Messages : 95
    Points : 104
    Points
    104
    Par défaut
    Tu peux simuler cette config avec 2 VM avec chacune 2 interfaces.

    VM1
    eth0 : 192.168.0.1
    eth1 : 10.0.0.1

    VM2
    eth0 : 192.168.1.1
    eth1 : 10.0.0.2

    Ensuite tu rajoutes les routes pour dire à VM1 que pour atteindre le sous-réseau 192.168.1.0/24 elle doit passer par 10.0.0.2 et inversement.

    Pour la commande spdadd, il te faut setkey. Par défaut tu dois avoir un fichier /etc/ipsec-tools.conf. Il faut copier les commandes coté serveur et coté client. Ensuite un /etc/init.d/setkey start devrait faire l'affaire.

    Les commandes spdadd que je t'ai donné ne permettent pas dans un premier temps de relier les 2 sous-réseaux mais uniquement les machines entre elles. Pour les sous-réseaux il faut modifier les ip.

  11. #11
    Membre à l'essai
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Points : 13
    Points
    13
    Par défaut
    J'ai configuré tout ce que tu m'a dit, les réseaux, les routes,ipsec-tools.conf, par contre quand j'essaie de starter le service setkey il me sort une erreur invalid key length at [1234567890123456789012] que se soit sur le serveur ou le client?

  12. #12
    Membre régulier
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Mars 2007
    Messages : 95
    Points : 104
    Points
    104
    Par défaut
    Essaye "hogehogehogehoge", il faut une clé de 24 octets normalement.

  13. #13
    Membre à l'essai
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Points : 13
    Points
    13
    Par défaut
    johnjohn33, même avec "hogehogehogehoge" cela ne fonctionne pas cela dit j'ai monté au final trois VM

    VM 1 serveur
    eth0=192.168.232.150
    netmask=255.255.255.0
    eth1=10.0.0.1
    netmask=255.0.0.0

    VM 2 passerelle
    eth0=10.0.0.2
    netmask=255.0.0.0
    eth1=192.168.1.1
    netmask=255.255.255.0


    VM 3 Client
    eth0=192.168.1.2
    netmask=255.255.255.0

    j'ai rajouté une route sur le serveur vers la passerelle et de même sur la passerelle vers le serveur.

    j'ai reconfiguré les fichiers /etc/ipsec.conf sur le client et le serveur j'ai mi auto=add

    quand je redémarre le service ipsec sur le serveur et le client tout se passe bien. quand je fais ipsec auto --up maman(ma connection) il me marque qu'il est en train d'initialiser la connection mais qu'il arrive jamais à le faire et me répond qu'il y a pas de réponse.

  14. #14
    Membre régulier
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Mars 2007
    Messages : 95
    Points : 104
    Points
    104
    Par défaut
    Est-ce qu'avec tcpdump tu vois tes trames arrivées ?

  15. #15
    Membre à l'essai
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Points : 13
    Points
    13
    Par défaut
    voici le résultat de la commande tcpdump. à la fin de l'exécution de la commande, l'OS me dit qu'il a capturé tant de packets et que 666 packets received by filter et 376 packets dropped by kernerl alors qu'il n'y a pas de régles de firewall. 192.168.232.2 est le dns par défaut de vmware et 192.168.232.141 je la connais pas elle n'existe pas.

    Code X : 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
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    16:42:54.775836 arp who-has 192.168.1.1 tell 192.168.1.2
    16:42:54.776484 arp reply 192.168.1.1 is-at 00:0c:29:0c:4a:e2 (oui Unknown)
    16:42:54.777149 IP (tos 0x0, ttl 64, id 61916, offset 0, flags [DF], proto UDP (17), length 70) Serveur.50469 > 192.168.232.2.domain: 20377+ PTR? 1.1.168.192.in-addr.arpa. (42)
    16:42:54.779859 IP (tos 0x0, ttl 64, id 43069, offset 0, flags [DF], proto UDP (17), length 118) 192.168.1.2.56046 > 192.168.232.2.domain: 53879+[|domain]
    16:42:54.780740 IP (tos 0x0, ttl 128, id 1438, offset 0, flags [none], proto UDP (17), length 147) 192.168.232.2.domain > Serveur.50469: 20377 NXDomain 0/1/0 (119)
    16:42:58.380819 arp who-has 192.168.232.2 tell Serveur
    16:42:58.381451 arp reply 192.168.232.2 is-at 00:50:56:e3:d5:b8 (oui Unknown)
    16:43:04.261270 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 340) 192.168.1.2.isakmp > 10.0.0.1.isakmp: isakmp 1.0 msgid : phase 1 I ident: [|sa]
    16:43:09.356774 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 654, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:43:17.346805 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 662, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:43:22.340600 arp who-has 192.168.1.1 tell 192.168.1.2
    16:43:22.341192 arp reply 192.168.1.1 is-at 00:0c:29:0c:4a:e2 (oui Unknown)
    16:43:24.233562 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 340) 192.168.1.2.isakmp > 10.0.0.1.isakmp: isakmp 1.0 msgid : phase 1 I ident: [|sa]
    16:43:31.331523 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 676, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:43:40.311116 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 685, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:43:55.289583 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 700, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:43:55.313809 IP (tos 0x0, ttl 64, id 59473, offset 0, flags [DF], proto UDP (17), length 74) 192.168.1.2.41206 > 192.168.232.2.domain: 17889+ PTR? 254.232.168.192.in-addr.arpa. (46)
    16:43:56.144848 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) Serveur > 192.168.232.2: ICMP echo request, id 3618, seq 1, length 64
    16:43:56.145412 IP (tos 0x0, ttl 128, id 1439, offset 0, flags [none], proto ICMP (1), length 84) 192.168.232.2 > Serveur: ICMP echo reply, id 3618, seq 1, length 64
    16:43:57.147933 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) Serveur > 192.168.232.2: ICMP echo request, id 3618, seq 2, length 64
    16:43:57.150849 arp who-has Serveur tell 192.168.232.2
    16:43:57.150921 arp reply Serveur is-at 00:0c:29:7d:c3:f9 (oui Unknown)
    16:43:57.151089 arp reply Serveur is-at 00:0c:29:7d:c3:03 (oui Unknown)
    16:43:57.151125 IP (tos 0x0, ttl 128, id 1440, offset 0, flags [none], proto ICMP (1), length 84) 192.168.232.2 > Serveur: ICMP echo reply, id 3618, seq 2, length 64
    16:43:58.153770 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) Serveur > 192.168.232.2: ICMP echo request, id 3618, seq 3, length 64
    16:43:58.154324 IP (tos 0x0, ttl 128, id 1441, offset 0, flags [none], proto ICMP (1), length 84) 192.168.232.2 > Serveur: ICMP echo reply, id 3618, seq 3, length 64
    16:43:59.157898 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) Serveur > 192.168.232.2: ICMP echo request, id 3618, seq 4, length 64
    16:43:59.158481 IP (tos 0x0, ttl 128, id 1442, offset 0, flags [none], proto ICMP (1), length 84) 192.168.232.2 > Serveur: ICMP echo reply, id 3618, seq 4, length 64
    16:44:00.165461 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) Serveur > 192.168.232.2: ICMP echo request, id 3618, seq 5, length 64
    16:44:00.166018 IP (tos 0x0, ttl 128, id 1443, offset 0, flags [none], proto ICMP (1), length 84) 192.168.232.2 > Serveur: ICMP echo reply, id 3618, seq 5, length 64
    16:44:00.281449 arp who-has 192.168.1.1 tell 192.168.1.2
    16:44:00.282117 arp reply 192.168.1.1 is-at 00:0c:29:0c:4a:e2 (oui Unknown)
    16:44:00.312302 IP (tos 0x0, ttl 64, id 59474, offset 0, flags [DF], proto UDP (17), length 74) 192.168.1.2.41206 > 192.168.232.2.domain: 17889+ PTR? 254.232.168.192.in-addr.arpa. (46)
    16:44:04.190469 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 340) 192.168.1.2.isakmp > 10.0.0.1.isakmp: isakmp 1.0 msgid : phase 1 I ident: [|sa]
    16:44:05.424021 IP6 (hlim 255, next-header UDP (17) payload length: 54) fe80::20c:29ff:fec0:c1ff.mdns > ff02::fb.mdns: 0[|domain]
    16:44:05.425127 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 74) 192.168.1.2.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 254.232.168.192.in-addr.arpa. (46)
    16:44:05.426338 IP (tos 0x0, ttl 64, id 14042, offset 0, flags [DF], proto UDP (17), length 118) Serveur.36799 > 192.168.232.2.domain: 29714+[|domain]
    16:44:05.431091 IP (tos 0x0, ttl 128, id 1444, offset 0, flags [none], proto UDP (17), length 179) 192.168.232.2.domain > Serveur.36799: 29714 NXDomain[|domain]
    16:44:05.432578 IP (tos 0x0, ttl 64, id 14044, offset 0, flags [DF], proto UDP (17), length 118) Serveur.60405 > 192.168.232.2.domain: 7793+[|domain]
    16:44:05.437855 IP (tos 0x0, ttl 128, id 1445, offset 0, flags [none], proto UDP (17), length 179) 192.168.232.2.domain > Serveur.60405: 7793 NXDomain[|domain]
    16:44:05.439090 IP (tos 0x0, ttl 64, id 14045, offset 0, flags [DF], proto UDP (17), length 70) Serveur.53866 > 192.168.232.2.domain: 22368+ PTR? 251.0.0.224.in-addr.arpa. (42)
    16:44:05.443175 IP (tos 0x0, ttl 128, id 1446, offset 0, flags [none], proto UDP (17), length 128) 192.168.232.2.domain > Serveur.53866: 22368 NXDomain 0/1/0 (100)
    16:44:06.439369 IP6 (hlim 255, next-header UDP (17) payload length: 54) fe80::20c:29ff:fec0:c1ff.mdns > ff02::fb.mdns: 0[|domain]
    16:44:06.439472 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 74) 192.168.1.2.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 254.232.168.192.in-addr.arpa. (46)
    16:44:08.454188 IP6 (hlim 255, next-header UDP (17) payload length: 54) fe80::20c:29ff:fec0:c1ff.mdns > ff02::fb.mdns: 0[|domain]
    16:44:08.455159 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 74) 192.168.1.2.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 254.232.168.192.in-addr.arpa. (46)
    16:44:09.190429 IP (tos 0x0, ttl 64, id 62947, offset 0, flags [DF], proto UDP (17), length 70) 192.168.1.2.51418 > 192.168.232.2.domain: 22626+ PTR? 2.1.168.192.in-addr.arpa. (42)
    16:44:14.188377 IP (tos 0x0, ttl 64, id 62948, offset 0, flags [DF], proto UDP (17), length 70) 192.168.1.2.51418 > 192.168.232.2.domain: 22626+ PTR? 2.1.168.192.in-addr.arpa. (42)
    16:44:14.189559 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 340) 192.168.1.2.isakmp > 10.0.0.1.isakmp: isakmp 1.0 msgid : phase 1 I ident: [|sa]
    16:44:16.267449 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 721, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:44:19.298329 IP6 (hlim 255, next-header UDP (17) payload length: 50) fe80::20c:29ff:fec0:c1ff.mdns > ff02::fb.mdns: 0[|domain]
    16:44:19.299523 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 70) 192.168.1.2.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 2.1.168.192.in-addr.arpa. (42)
    16:44:19.301401 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 90) 192.168.1.2.mdns > 224.0.0.251.mdns: 0*- [0q] 1/0/0 2.1.168.192.in-addr.arpa. (Cache flush) PTR[|domain]
    16:44:19.306147 IP (tos 0x0, ttl 64, id 65480, offset 0, flags [DF], proto UDP (17), length 74) 192.168.1.2.44078 > 192.168.232.2.domain: 23159+ PTR? 141.232.168.192.in-addr.arpa. (46)
    16:44:24.313040 IP (tos 0x0, ttl 64, id 65481, offset 0, flags [DF], proto UDP (17), length 74) 192.168.1.2.44078 > 192.168.232.2.domain: 23159+ PTR? 141.232.168.192.in-addr.arpa. (46)
    16:44:29.422663 IP6 (hlim 255, next-header UDP (17) payload length: 54) fe80::20c:29ff:fec0:c1ff.mdns > ff02::fb.mdns: 0[|domain]
    16:44:29.423803 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 74) 192.168.1.2.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 141.232.168.192.in-addr.arpa. (46)
    16:44:30.437978 IP6 (hlim 255, next-header UDP (17) payload length: 54) fe80::20c:29ff:fec0:c1ff.mdns > ff02::fb.mdns: 0[|domain]
    16:44:30.438884 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 74) 192.168.1.2.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 141.232.168.192.in-addr.arpa. (46)
    16:44:32.454013 IP6 (hlim 255, next-header UDP (17) payload length: 54) fe80::20c:29ff:fec0:c1ff.mdns > ff02::fb.mdns: 0[|domain]
    16:44:32.455073 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 74) 192.168.1.2.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 141.232.168.192.in-addr.arpa. (46)
    16:44:34.173774 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 340) 192.168.1.2.isakmp > 10.0.0.1.isakmp: isakmp 1.0 msgid : phase 1 I ident: [|sa]
    16:44:35.231991 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 740, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:44:41.227642 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) Serveur > 192.168.232.2: ICMP echo request, id 5410, seq 1, length 64
    16:44:41.228430 IP (tos 0x0, ttl 128, id 1447, offset 0, flags [none], proto ICMP (1), length 84) 192.168.232.2 > Serveur: ICMP echo reply, id 5410, seq 1, length 64
    16:44:46.223741 arp who-has 192.168.232.2 tell Serveur
    16:44:46.224255 arp reply 192.168.232.2 is-at 00:50:56:e3:d5:b8 (oui Unknown)
    16:44:55.238228 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 760, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:45:00.232530 arp who-has 192.168.1.1 tell 192.168.1.2
    16:45:00.232853 arp reply 192.168.1.1 is-at 00:0c:29:0c:4a:e2 (oui Unknown)
    16:45:10.187535 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 775, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:45:14.128226 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 340) 192.168.1.2.isakmp > 10.0.0.1.isakmp: isakmp 1.0 msgid : phase 1 I ident: [|sa]
    16:45:24.114691 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 340) 192.168.1.2.isakmp > 10.0.0.1.isakmp: isakmp 1.0 msgid : phase 1 I ident: [|sa]
    16:45:26.163909 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 791, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:45:36.156127 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 801, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:45:44.092635 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 340) 192.168.1.2.isakmp > 10.0.0.1.isakmp: isakmp 1.0 msgid : phase 1 I ident: [|sa]
    16:45:47.160874 IP (tos 0x0, ttl 64, id 21939, offset 0, flags [DF], proto UDP (17), length 64) 192.168.1.2.60920 > 192.168.232.2.domain: 34178+ AAAA? Client.localdomain. (36)
    16:45:49.091348 arp who-has 192.168.1.1 tell 192.168.1.2
    16:45:49.091886 arp reply 192.168.1.1 is-at 00:0c:29:0c:4a:e2 (oui Unknown)
    16:45:50.119723 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 815, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:45:52.170607 IP (tos 0x0, ttl 64, id 21940, offset 0, flags [DF], proto UDP (17), length 64) 192.168.1.2.60920 > 192.168.232.2.domain: 34178+ AAAA? Client.localdomain. (36)
    16:46:06.108390 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 831, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:46:24.049547 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 340) 192.168.1.2.isakmp > 10.0.0.1.isakmp: isakmp 1.0 msgid : phase 1 I ident: [|sa]
    16:46:25.076171 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328) 192.168.1.2.bootpc > 192.168.232.254.bootps: BOOTP/DHCP, Request from 00:0c:29:c0:c1:ff (oui Unknown), length 300, xid 0x58bcb852, secs 850, Flags [none]
    	  Client-IP 192.168.232.141
    	  Client-Ethernet-Address 00:0c:29:c0:c1:ff (oui Unknown) [|bootp]
    16:46:34.040613 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 340) 192.168.1.2.isakmp > 10.0.0.1.isakmp: isakmp 1.0 msgid : phase 1 I ident: [|sa]

  16. #16
    Membre régulier
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Mars 2007
    Messages : 95
    Points : 104
    Points
    104
    Par défaut
    Tcpdump te permet de filtrer par rapport à l'adresse de destination et l'interface sur laquelle tu souhaites qu'il écoute. Jettes un coup d'oeil à la doc pour ne récupérer que les paquets entre ton client et ton serveur.

    On voit bien les paquets de ta phase 1

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    16:44:14.189559 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 340) 192.168.1.2.isakmp > 10.0.0.1.isakmp: isakmp 1.0 msgid : phase 1 I ident: [|sa]
    Si tu fais un tcpdump sur l'autre machine, vois-tu le paquet arrivé ?
    Au niveau routage tout est bon ? Tu arrives à pinguer les deux côtés ?

  17. #17
    Membre à l'essai
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Points : 13
    Points
    13
    Par défaut
    au niveau ping :
    le client (192.168.1.2) pingue la passerelle (192.168.1.1 ou 10.0.0.2)
    la passerelle (10.0.0.2) pingue le serveur en (10.0.0.1 ou en 192.168.232.150)
    le client ne pingue pas le serveur et vise versa.

    sur le serveur au niveau tcpdump, je vois que la passerelle(10.0.0.2) communique avec le serveur (10.0.0.1) en faisant des requêtes arp mais le reste ne me parles pas bcp.

  18. #18
    Membre à l'essai
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Points : 13
    Points
    13
    Par défaut
    il y a aussi cette ligne que je viens de m'en aperçevoir sur le serveur :

    10.0.0.2 > 10.0.0.1: ICMP 10.0.0.2 udp port domain unreachable, length 80 pourtant j'ai pas de firewall, enfin il n'est pas configuré

  19. #19
    Rédacteur

    Avatar de ram-0000
    Homme Profil pro
    Consultant en sécurité
    Inscrit en
    Mai 2007
    Messages
    11 517
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 61
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Consultant en sécurité
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Mai 2007
    Messages : 11 517
    Points : 50 367
    Points
    50 367
    Par défaut
    Citation Envoyé par linuxman Voir le message
    le client ne pingue pas le serveur et vise versa.
    Problème de routage...
    Vérifie ou montre nous les tables de routages sur chacune des machines (PC, serveur, gateway)
    Raymond
    Vous souhaitez participer à la rubrique Réseaux ? Contactez-moi

    Cafuro Cafuro est un outil SNMP dont le but est d'aider les administrateurs système et réseau à configurer leurs équipements SNMP réseau.
    e-verbe Un logiciel de conjugaison des verbes de la langue française.

    Ma page personnelle sur DVP
    .

  20. #20
    Membre à l'essai
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Points : 13
    Points
    13
    Par défaut
    j'ai configuré 3 VM(toutes en nat) pour schématiser un réseau.

    un client avec une adresse privée 192.168.1.2
    sa passerelle avec deux interfaces réseaux 192.168.1.1 et 10.0.0.2
    un serveur avec deux interfaces réseaux 10.0.0.1 et 192.168.232.150

    j'ai rajouté une route sur le serveur vers le réseau de la passerelle
    route add -net 192.168.1.0 netmask 255.255.255.0 10.0.0.2

    et j'ai fait de même sur la paserelle
    route add -net 192.168.232.0 netmask 255.255.255.0 10.0.0.1

    la passerelle pingue le serveur(192.168.232.150) et le serveur pingue la passerelle(192.168.1.1)

Discussions similaires

  1. [libssh2] mise en place d'un tunnel SSH
    Par vravier dans le forum Bibliothèques
    Réponses: 1
    Dernier message: 17/10/2012, 13h50
  2. Mise en place d'un RSO VPN internet sur plusieurs sites
    Par Solsbury dans le forum Développement
    Réponses: 0
    Dernier message: 12/10/2010, 15h03
  3. [SBS 2003] Mise en place d'un tunnel VPN pour des connexions RDP
    Par Miles Raymond dans le forum Windows Serveur
    Réponses: 3
    Dernier message: 14/03/2008, 10h10
  4. Réponses: 11
    Dernier message: 30/08/2006, 14h20
  5. mise en place vpn
    Par kap dans le forum Développement
    Réponses: 5
    Dernier message: 15/02/2006, 14h27

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo