par shubnigourat » 17 Sep 2003 11:22
Bonjour,
<BR>
<BR>Depuis qq semaine je teste le VPN entre des config diverses et variées.
<BR>
<BR>W2k-W2k sur un LAN
<BR>W2k-W2k via l ADSL et au travers de FW
<BR>W2k-W2k via l ADSL au travers de Routeur NAT
<BR>W2K-Ipcop en local
<BR>Ipcop-W2k via ADSL
<BR>
<BR>c est jamais sans problemes mais en general il suffit de consulter les logs et corriger qq erreurs de syntaxe dans les fichiers de conf. Parfois une bonne relecture des tres bon How-to dispo sur le web fait avancer les chose. Au pire on fait une petite recherche dans l abondante ressource du forum Ixux et on finit par trouver !
<BR>Encore bravo a toutes les personnes qui animent ce forum !
<BR>
<BR>Malheureusement aujourd'hui je suis complettement bloqué.
<BR>je teste une conf
<BR>
<BR>ipcop-w2k a travers l ADSL et des routeurs NAT avec authentification par certificat x509
<BR>
<BR>Le probleme c est que les 2 parties se voient, commence a echanger des données mais la negotiation n abouti jamais. Ca ressemble a un bete pb de conf mais je vois vraiment pas ou. Un probleme avec les certificats ? La j y connais pas grand chose. Je me suis contenté de suivre le How-to suivant :
<BR>
<BR><!-- BBCode auto-link start --><a href="http://www.decaservices.com/docs/securite/vpn/freeswan.html" target="_blank">http://www.decaservices.com/docs/securite/vpn/freeswan.html</a><!-- BBCode auto-link end -->
<BR>
<BR>J'attends votre analyse car je commence a desespérer.
<BR>En attendant je vais tester la conf avec une authentification RSA simple.
<BR>
<BR>
<BR>----------------------------------------
<BR>
<BR>
<BR>Voila un schema detaillé :
<BR>
<BR>Coté Passerelle Ipcop
<BR>
<BR>Passerelle---------red --------- Routeur NAT ----- Modem ADSL --- Internet
<BR>Ipcop v1.2 192.168.0.1 192.168.0.254 Ip fixe
<BR> | 81.80.167.xx
<BR>Green
<BR>10.0.0.1
<BR> |
<BR>Reseau A
<BR>10.0.0.0/24
<BR>
<BR>
<BR>Coté PC winXp
<BR>
<BR>Internet----Modem ADSL-------PC Winxp
<BR> @Ip variable FW Look'n'Stop
<BR> 213.103.xx.xx
<BR>
<BR>Au niveau du routeur NAT
<BR>UDP 500 et protocole 50/51 ont été tranféré sur l interface rouge de la passerelle Ipcop.
<BR>
<BR>ipsec.conf coté ipcop :
<BR>-------------------------
<BR>
<BR>config setup
<BR> interfaces=%defaultroute
<BR> uniqueids=yes
<BR> plutodebug=all
<BR> plutoload=%search
<BR> plutostart=%search
<BR> syslog=syslog.info
<BR>
<BR>conn %default
<BR> keyingtries=0
<BR> compress=yes
<BR> authby=rsasig
<BR>
<BR>conn SDC_GEMENOS
<BR> left=%defaultroute
<BR> leftsubnet=10.0.0.0/24
<BR> leftnexthop=
<BR> leftcert=firewall.pem
<BR> leftrsasigkey=%cert
<BR> right=%any
<BR> rightnexthop=%defaultroute
<BR> rightrsasigkey=%cert
<BR> pfs=yes
<BR> auto=add
<BR>
<BR>ipsec.secrets :
<BR>---------------
<BR>
<BR>: RSA firewall.key "ab&l40v"
<BR>
<BR>
<BR>ipsec.conf coté winXP :
<BR>--------------------------
<BR>
<BR>conn road
<BR>left=%any
<BR>leftsubnet=213.103.xx.xx/32
<BR>right=81.80.167.xx
<BR>rightsubnet=10.0.0.0/24
<BR>rightca="C=FR, S=France, L=Gemenos, O=Coframi, CN=firewall, Email=shubnigourat@yahoo.fr"
<BR>network=auto
<BR>auto=start
<BR>pfs=yes
<BR>
<BR>
<BR>--------------------------
<BR>
<BR>J ai verifié le FW sous win2k. j ai fait verifié le transfert de UDP 500 et protocole 50/51 vers la passerelle Ipcop par mon FAI Oleane. Tout a l air OK.
<BR>
<BR>Pour ce qui est de la conf Ipcop
<BR>
<BR>#ipsec auto --rereadall
<BR>#ipsec auto --listall
<BR>
<BR>ne renvoie aucune erreur.
<BR>
<BR>Voila les logs au demarrage de ipsec
<BR>
<BR>#/usr/local/bin/ipsecctrl R
<BR># tail -f /var/log/messages
<BR>
<BR>Sep 17 11:01:38 firewall ipsec_setup: ...FreeS/WAN IPsec stopped
<BR>Sep 17 11:01:47 firewall ipsec_setup: Stopping FreeS/WAN IPsec...
<BR>Sep 17 11:01:47 firewall ipsec_setup: stop ordered, but IPsec does not appear to be running!
<BR>Sep 17 11:01:47 firewall ipsec_setup: doing cleanup anyway...
<BR>Sep 17 11:01:50 firewall ipsec_setup: ...FreeS/WAN IPsec stopped
<BR>Sep 17 11:01:55 firewall ipsec_setup: Starting FreeS/WAN IPsec 1.99...
<BR>Sep 17 11:01:57 firewall ipsec_setup: KLIPS debug `none'
<BR>Sep 17 11:02:01 firewall ipsec_setup: KLIPS ipsec0 on eth2 192.168.0.1/255.255.255.0 broadcast 192.168.0.255
<BR>Sep 17 11:02:02 firewall dansguardian: Error connecting to proxy
<BR>Sep 17 11:02:03 firewall ipsec_setup: ...FreeS/WAN IPsec started
<BR>
<BR># tail -f /var/log/secure
<BR>
<BR>Sep 17 11:02:24 firewall pluto[12605]: | IP interface eth0 10.0.0.1 has no matching ipsec* interface -- ignored
<BR>Sep 17 11:02:24 firewall pluto[12605]: | IP interface lo 127.0.0.1 has no matching ipsec* interface -- ignored
<BR>Sep 17 11:02:24 firewall pluto[12605]: | could not open /proc/net/if_inet6
<BR>Sep 17 11:02:24 firewall pluto[12605]: loading secrets from "/etc/ipsec.secrets"
<BR>Sep 17 11:02:24 firewall pluto[12605]: loaded private key file '/etc/ipsec.d/private/firewall.key' (963 bytes)
<BR>Sep 17 11:02:24 firewall pluto[12605]: | file content is not binary ASN.1
<BR>Sep 17 11:02:24 firewall pluto[12605]: | -----BEGIN RSA PRIVATE KEY-----
<BR>Sep 17 11:02:24 firewall pluto[12605]: | Proc-Type: 4,ENCRYPTED
<BR>Sep 17 11:02:24 firewall pluto[12605]: | DEK-Info: DES-EDE3-CBC,B91CB0DDB00038DE
<BR>Sep 17 11:02:24 firewall pluto[12605]: | -----END RSA PRIVATE KEY-----
<BR>Sep 17 11:02:24 firewall pluto[12605]: | decrypting file using 'DES-EDE3-CBC'
<BR>Sep 17 11:02:24 firewall pluto[12605]: | file coded in PEM format
<BR>Sep 17 11:02:24 firewall pluto[12605]: | L0 - RSAPrivateKey:
<BR>Sep 17 11:02:24 firewall pluto[12605]: | L1 - version:
<BR>Sep 17 11:02:24 firewall pluto[12605]: | L1 - modulus:
<BR>Sep 17 11:02:24 firewall pluto[12605]: | L1 - publicExponent:
<BR>Sep 17 11:02:24 firewall pluto[12605]: | L1 - privateExponent:
<BR>Sep 17 11:02:24 firewall pluto[12605]: | L1 - prime1:
<BR>Sep 17 11:02:24 firewall pluto[12605]: | L1 - prime2:
<BR>Sep 17 11:02:24 firewall pluto[12605]: | L1 - exponent1:
<BR>Sep 17 11:02:24 firewall pluto[12605]: | L1 - exponent2:
<BR>Sep 17 11:02:24 firewall pluto[12605]: | L1 - coefficient:
<BR>Sep 17 11:02:24 firewall pluto[12605]: | next event EVENT_SHUNT_SCAN in 99 seconds
<BR>
<BR>
<BR>Les logs lorsque le client winXP tentent d ouvrir le tunnel :
<BR>
<BR>Sep 16 23:50:53 firewall pluto[29140]: | *received 216 bytes from 213.103.4.57:500 on eth2
<BR>Sep 16 23:50:53 firewall pluto[29140]: | 36 00 72 d9 57 32 b7 e8 00 00 00 00 00 00 00 00
<BR>....
<BR>....
<BR>....
<BR>Sep 16 23:50:53 firewall pluto[29140]: | **parse ISAKMP Message:
<BR>Sep 16 23:50:53 firewall pluto[29140]: | initiator cookie:
<BR>Sep 16 23:50:53 firewall pluto[29140]: | 36 00 72 d9 57 32 b7 e8
<BR>Sep 16 23:50:53 firewall pluto[29140]: | responder cookie:
<BR>Sep 16 23:50:53 firewall pluto[29140]: | 00 00 00 00 00 00 00 00
<BR>Sep 16 23:50:53 firewall pluto[29140]: | next payload type: ISAKMP_NEXT_SA
<BR>Sep 16 23:50:53 firewall pluto[29140]: | ISAKMP version: ISAKMP Version 1.0
<BR>Sep 16 23:50:53 firewall pluto[29140]: | exchange type: ISAKMP_XCHG_IDPROT
<BR>Sep 16 23:50:53 firewall pluto[29140]: | flags: none
<BR>Sep 16 23:50:53 firewall pluto[29140]: | message ID: 00 00 00 00
<BR>Sep 16 23:50:53 firewall pluto[29140]: | length: 216
<BR>Sep 16 23:50:53 firewall pluto[29140]: | ***parse ISAKMP Security Association Payload:
<BR>Sep 16 23:50:53 firewall pluto[29140]: | next payload type: ISAKMP_NEXT_VID
<BR>Sep 16 23:50:53 firewall pluto[29140]: | length: 164
<BR>Sep 16 23:50:53 firewall pluto[29140]: | DOI: ISAKMP_DOI_IPSEC
<BR>Sep 16 23:50:53 firewall pluto[29140]: | ***parse ISAKMP Vendor ID Payload:
<BR>Sep 16 23:50:54 firewall pluto[29140]: | next payload type: ISAKMP_NEXT_NONE
<BR>Sep 16 23:50:54 firewall pluto[29140]: | length: 24
<BR>Sep 16 23:50:54 firewall pluto[29140]: packet from 213.103.4.57:500: ignoring Vendor ID payload
<BR>Sep 16 23:50:54 firewall pluto[29140]: | VID: 1e 2b 51 69 05 99 1c 7d 7c 96 fc bf b5 87 e4 61
<BR>Sep 16 23:50:54 firewall pluto[29140]: | 00 00 00 03
<BR>Sep 16 23:50:54 firewall pluto[29140]: packet from 213.103.4.57:500: initial Main Mode message received on 192.168.0.1:500 but
<BR>no connection has been authorized
<BR>
<BR>ce qui me derange c est
<BR>
<BR>Sep 16 23:50:54 firewall pluto[29140]: packet from 213.103.4.57:500: ignoring Vendor ID payload
<BR>
<BR>et
<BR>
<BR>Sep 16 23:50:54 firewall pluto[29140]: packet from 213.103.4.57:500: initial Main Mode message received on 192.168.0.1:500 but
<BR>no connection has been authorized
<BR>
<BR>du cote de la log win2K Oakley on a qq chose du type
<BR>
<BR>"l autre partie n a pas repondu"
<BR>
<BR>le probleme semble donc etre du coté d Ipcop.