Re: ipsec VPN

From: Thomas Beer <nohuman(at)gmail.com>
Date: Mon, 29 Nov 2004 18:05:04 +0100

Hi,

>
> Ist jetzt vielleicht eine unverschämte oder dumme Frage, aber:
> Was willst du mit dem gif-tunnel genau?

Bin drauf gekommen, dass ich den gar nicht benötige, stochere
dennoch etwas im Nebel.

> Vielleicht wäre eine kleine ASCII-Art-Zeichung mit
> der Konfiguration sinnvoll.

      ------------------------------------------------------------------
          | |
192.168.2.2 XP wifi client
   (wifi AP)

> Die Ausgabe von
>
> % setkey -D
> % setkey -DP
>

setkey -D
192.168.2.2 192.168.2.8
        esp mode=tunnel spi=2820686604(0xa820430c) reqid=0(0x00000000)
        E: 3des-cbc 910ed55b bc05dc6e c9ee716f caaaf742 e8be6821 5c69f0cf
        A: hmac-sha1 2d800875 0953fc78 fd236a13 81a13d76 852346e6
        seq=0x00000000 replay=4 flags=0x00000000 state=mature
        created: Nov 29 17:47:47 2004 current: Nov 29 17:49:15 2004
        diff: 88(s) hard: 900(s) soft: 720(s)
        last: hard: 0(s) soft: 0(s)
        current: 0(bytes) hard: 0(bytes) soft: 0(bytes)
        allocated: 0 hard: 0 soft: 0
        sadb_seq=5 pid=711 refcnt=1
192.168.2.2 192.168.2.8
        esp mode=tunnel spi=2556895840(0x98672260) reqid=0(0x00000000)
        E: 3des-cbc e3dfff87 4b1e7e30 d387e3e9 f7c15b8f 43aca72e a80cdb4b
        A: hmac-sha1 e23090df aaf68269 16d51c0a 10c6319c 0f5c18a1
        seq=0x00000000 replay=4 flags=0x00000000 state=mature
        created: Nov 29 17:42:04 2004 current: Nov 29 17:49:15 2004
        diff: 431(s) hard: 900(s) soft: 720(s)
        last: hard: 0(s) soft: 0(s)
        current: 0(bytes) hard: 0(bytes) soft: 0(bytes)
        allocated: 0 hard: 0 soft: 0
        sadb_seq=4 pid=711 refcnt=1
192.168.2.2 192.168.2.8
        esp mode=tunnel spi=427292166(0x1977f606) reqid=0(0x00000000)
        E: 3des-cbc e0218046 3bce8e48 bb33ebdd b665aed9 937b4576 145c6a15
        A: hmac-sha1 57b629f6 3b9ffff3 c473b193 b9545444 20cf54f4
        seq=0x00000281 replay=4 flags=0x00000000 state=mature
        created: Nov 29 17:40:27 2004 current: Nov 29 17:49:15 2004
        diff: 528(s) hard: 900(s) soft: 720(s)
        last: Nov 29 17:49:14 2004 hard: 0(s) soft: 0(s)
        current: 90064(bytes) hard: 0(bytes) soft: 0(bytes)
        allocated: 641 hard: 0 soft: 0
        sadb_seq=3 pid=711 refcnt=2
192.168.2.8 192.168.2.2
        esp mode=tunnel spi=196604985(0x0bb7f439) reqid=0(0x00000000)
        E: 3des-cbc bf1981ce df47778f 366d8333 4af3f294 c9511168 d41ff183
        A: hmac-sha1 e29178c3 a1a805b9 c8f23b6c 36d9b1e7 4054d0bc
        seq=0x00000000 replay=4 flags=0x00000000 state=mature
        created: Nov 29 17:47:47 2004 current: Nov 29 17:49:15 2004
        diff: 88(s) hard: 900(s) soft: 720(s)
        last: Nov 29 17:49:10 2004 hard: 0(s) soft: 0(s)
        current: 3874(bytes) hard: 0(bytes) soft: 0(bytes)
        allocated: 44 hard: 0 soft: 0
        sadb_seq=2 pid=711 refcnt=1
192.168.2.8 192.168.2.2
        esp mode=tunnel spi=266131635(0x0fdcd8b3) reqid=0(0x00000000)
        E: 3des-cbc 000c9d3b a0ba85cf 83a5035b 64163e75 22cd310e 4c6bd283
        A: hmac-sha1 6b378b14 84462aa5 34b8e82a c513f71b 6b9fe88d
        seq=0x00000000 replay=4 flags=0x00000000 state=mature
        created: Nov 29 17:42:04 2004 current: Nov 29 17:49:15 2004
        diff: 431(s) hard: 900(s) soft: 720(s)
        last: Nov 29 17:47:27 2004 hard: 0(s) soft: 0(s)
        current: 12117(bytes) hard: 0(bytes) soft: 0(bytes)
        allocated: 135 hard: 0 soft: 0
        sadb_seq=1 pid=711 refcnt=1
192.168.2.8 192.168.2.2
        esp mode=tunnel spi=115889784(0x06e85678) reqid=0(0x00000000)
        E: 3des-cbc 4719174c 33df96fc 88f91488 6b531f03 2549695a 5a228469
        A: hmac-sha1 db4ea0c4 94d284a3 a0ffa2ff a35259c5 1e1acf20
        seq=0x00000000 replay=4 flags=0x00000000 state=mature
        created: Nov 29 17:40:27 2004 current: Nov 29 17:49:15 2004
        diff: 528(s) hard: 900(s) soft: 720(s)
        last: Nov 29 17:41:36 2004 hard: 0(s) soft: 0(s)
        current: 2067(bytes) hard: 0(bytes) soft: 0(bytes)
        allocated: 20 hard: 0 soft: 0
        sadb_seq=0 pid=711 refcnt=1
[root(at)amd root]# setkey -DP
192.168.2.8[any] 0.0.0.0/0[any] any
        in ipsec
        esp/tunnel/192.168.2.8-192.168.2.2/require
        spid=1 seq=1 pid=712
        refcnt=1
0.0.0.0/0[any] 192.168.2.8[any] any
        out ipsec
        esp/tunnel/192.168.2.2-192.168.2.8/require
        spid=2 seq=0 pid=712
        refcnt=1

> auf FreeBSD und die Ausgabe von
>
> % ipseccmd show all
>
> auf Windows (ohne eventuelle Shared-Secrets natürlich ;-)) wäre
> nicht schlecht.

das Kommando hat mein XP (Professional!) nicht?!

>
> % tcpdump -vvvv -i <if>
> rechnerB% ping rechnerB

von dem was ich im tcpdump sehe, gehe ich davon aus, dass
beide miteinander kommunizieren. XP zeigt mir auch den
Austausch von Pakteten an. Ich seh auch die Mac Adresse des
XP Rechners unter FBSD.

tcpdump -i wi0 -t
tcpdump: listening on wi0
wifi.mobile > ibm.mobile: ESP(spi=0x1977f606,seq=0x2b6)
wifi.mobile > ibm.mobile: ESP(spi=0x1977f606,seq=0x2b7)
ibm.mobile.netbios-dgm > 192.168.2.15.netbios-dgm: NBT UDP PACKET(138)
ibm.mobile.netbios-dgm > 192.168.2.15.netbios-dgm: NBT UDP PACKET(138)
wifi.mobile > ibm.mobile: ESP(spi=0x1977f606,seq=0x2b8)
ibm.mobile.netbios-dgm > 192.168.2.15.netbios-dgm: NBT UDP PACKET(138)
ibm.mobile.netbios-dgm > 192.168.2.15.netbios-dgm: NBT UDP PACKET(138)
wifi.mobile > ibm.mobile: ESP(spi=0x1977f606,seq=0x2b9)
ibm.mobile > wifi.mobile: ESP(spi=0x00bd4cfa,seq=0x15)
wifi.mobile > ibm.mobile: ESP(spi=0x1977f606,seq=0x2ba)
wifi.mobile > ibm.mobile: ESP(spi=0x1977f606,seq=0x2bb)
ibm.mobile.netbios-dgm > 192.168.2.15.netbios-dgm: NBT UDP PACKET(138)
ibm.mobile.netbios-dgm > 192.168.2.15.netbios-dgm: NBT UDP PACKET(138)
arp who-has wifi.mobile tell ibm.mobile
arp who-has wifi.mobile tell ibm.mobile
arp reply wifi.mobile is-at 0:9:5b:91:85:6e
ibm.mobile > wifi.mobile: ESP(spi=0x00bd4cfa,seq=0x16) [ttl 1]
wifi.mobile > ibm.mobile: ESP(spi=0x1977f606,seq=0x2bc)
wifi.mobile > ibm.mobile: ESP(spi=0x1977f606,seq=0x2bd)
ibm.mobile.netbios-dgm > 192.168.2.15.netbios-dgm: NBT UDP PACKET(138)
ibm.mobile.netbios-dgm > 192.168.2.15.netbios-dgm: NBT UDP PACKET(138)
ibm.mobile > wifi.mobile: ESP(spi=0x00bd4cfa,seq=0x17) (DF)
wifi.mobile > ibm.mobile: ESP(spi=0x1977f606,seq=0x2be)
ibm.mobile > wifi.mobile: ESP(spi=0x00bd4cfa,seq=0x18) [ttl 1]
wifi.mobile > ibm.mobile: ESP(spi=0x1977f606,seq=0x2bf)
wifi.mobile > ibm.mobile: ESP(spi=0x1977f606,seq=0x2c0)
ibm.mobile.netbios-dgm > 192.168.2.15.netbios-dgm: NBT UDP PACKET(138)
ibm.mobile.netbios-dgm > 192.168.2.15.netbios-dgm: NBT UDP PACKET(138)
^C
33 packets received by filter
0 packets dropped by kernel
>
> In den ESP-Paketen nachprüfen, ob die SA-Identifier übereinstimmen
>
> rechnerA% ping rechnerB
>
> In den ESP-Paketen nachprüfen, ob die SA-Identifier übereinstimmen
>
> Sollten die übereinstimmen, kann es eigentlich nur noch ein
> Firewall-Problem sein.

Ich hab auf beiden Seiten ein "pass all on any"

Unter XP habe ich die Policy in der Konsole eingerichtet und
zugewiesen. Mich wundert warum mir das Kommando fehlt.

Grüße Tom

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Mon 29 Nov 2004 - 18:05:53 CET

search this site