Hallo Thomas, ja, ich habe eine eigene CA definiert und die Certifikate erstellt, die Ausgabe von Rechner wenn ich ipsec starte: May 31 16:12:24 routerms ipsec__plutorun: Starting Pluto subsystem... May 31 16:12:24 routerms ipsec_setup: ...FreeS/WAN IPsec started May 31 16:12:24 routerms ipsec_setup: ^M^[[95C^[[10D^[[1;32mdone^[[m^O May 31 16:12:24 routerms pluto[5117]: Starting Pluto (FreeS/WAN Version 1.99) May 31 16:12:24 routerms pluto[5117]: ; ; including X.509 patch with traffic selectors (Version 0.9.23) May 31 16:12:24 routerms pluto[5117]: ; ; including NAT-Traversal patch (Version 0.5a) [disabled] May 31 16:12:24 routerms pluto[5117]: ike_alg_register_enc: Activating OAKLEY_AES_CBC: Ok (ret=0) May 31 16:12:24 routerms pluto[5117]: ike_alg_register_enc: Activating OAKLEY_BLOWFISH_CBC: Ok (ret=0) May 31 16:12:24 routerms pluto[5117]: ike_alg_register_hash: Activating OAKLEY_SHA2_256: Ok (ret=0) May 31 16:12:24 routerms pluto[5117]: ike_alg_register_hash: Activating OAKLEY_SHA2_512: Ok (ret=0) May 31 16:12:24 routerms pluto[5117]: ike_alg_register_enc: Activating OAKLEY_TWOFISH_CBC: Ok (ret=0) May 31 16:12:24 routerms pluto[5117]: ike_alg_register_enc: Activating OAKLEY_SSH_PRIVATE_65289: Ok (ret=0) May 31 16:12:24 routerms pluto[5117]: Changing to directory '/etc/ipsec.d/cacerts' May 31 16:12:24 routerms pluto[5117]: ; ; loaded cacert file 'cacert.pem' (1192 bytes) May 31 16:12:24 routerms pluto[5117]: Changing to directory '/etc/ipsec.d/crls' May 31 16:12:24 routerms pluto[5117]: ; ; loaded crl file 'crl.pem' (609 bytes) May 31 16:12:24 routerms pluto[5117]: ; ; could not open my default X.509 cert file '/etc/x509cert.der' May 31 16:12:24 routerms pluto[5117]: OpenPGP certificate file '/etc/pgpcert.pgp' not found May 31 16:12:25 routerms pluto[5117]: | from whack: got --esp=3des May 31 16:12:25 routerms pluto[5117]: | from whack: got --ike=3des May 31 16:12:25 routerms pluto[5117]: ; ; loaded host cert file '/etc/ipsec.d/GatewayCert.pem' (1005 bytes) May 31 16:12:25 routerms pluto[5117]: added connection description "p2n" May 31 16:12:25 routerms pluto[5117]: | from whack: got --esp=3des May 31 16:12:25 routerms pluto[5117]: | from whack: got --ike=3des May 31 16:12:25 routerms pluto[5117]: ; ; loaded host cert file '/etc/ipsec.d/GatewayCert.pem' (1005 bytes) May 31 16:12:25 routerms pluto[5117]: added connection description "n2n" May 31 16:12:25 routerms pluto[5117]: listening for IKE messages May 31 16:12:25 routerms pluto[5117]: adding interface ipsec0/ppp0 80.134.83.244 May 31 16:12:25 routerms pluto[5117]: loading secrets from "/etc/ipsec.secrets" May 31 16:12:25 routerms pluto[5117]: ; ; loaded private key file '/etc/ipsec.d/private/GatewayKey.pem' (963 bytes) Danach kommt die Verbindung: Ausgabe von Server: May 31 16:20:07 routerms pluto[10477]: "p2n"[1] 217.84.234.108 #1: responding to Main Mode from unknown peer 217.84.234.108 May 31 16:20:07 routerms pluto[10477]: "p2n"[1] 217.84.234.108 #1: Peer ID is ID_DER_ASN1_DN: 'C=DE, L=G?ttingen, O=Private, OU=VPN, CN=Lars' May 31 16:20:07 routerms pluto[10477]: "n2n"[1] 217.84.234.108 #1: deleting connection "p2n" instance with peer 217.84.234.108 May 31 16:20:08 routerms pluto[10477]: "n2n"[1] 217.84.234.108 #1: sent MR3, ISAKMP SA established May 31 16:20:08 routerms pluto[10477]: "n2n"[1] 217.84.234.108 #2: responding to Quick Mode May 31 16:20:08 routerms pluto[10477]: "n2n"[1] 217.84.234.108 #2: IPsec SA established Ausgabe vom Clienten: May 31 16:21:15 Server kernel: ipsec_md5_init(alg_type=14 alg_id=2 name=md5): ret=0 May 31 16:21:15 Server kernel: ipsec_sha1_init(alg_type=14 alg_id=3 name=sha1): ret=0 May 31 16:21:15 Server ipsec_setup: ipsec ipsec_3des ipsec_md5 ipsec_sha1 May 31 16:21:15 Server ipsec_setup: KLIPS ipsec0 on ppp0 217.84.234.108/255.255.255.255 pointopoint 217.5.98.59 May 31 16:21:15 Server ipsec_setup: WARNING: ppp0 has route filtering turned on, KLIPS may not work May 31 16:21:15 Server ipsec__setup: (/proc/sys/net/ipv4/conf/ppp0/rp_filter = `1', should be 0) May 31 16:21:15 Server ipsec__plutorun: Starting Pluto subsystem... May 31 16:21:15 Server pluto[5968]: Starting Pluto (FreeS/WAN Version 1.99) May 31 16:21:15 Server pluto[5968]: ; ; including X.509 patch with traffic selectors (Version 0.9.23) May 31 16:21:15 Server pluto[5968]: ; ; including NAT-Traversal patch (Version 0.5a) [disabled] May 31 16:21:15 Server pluto[5968]: ike_alg_register_enc: Activating OAKLEY_AES_CBC: Ok (ret=0) May 31 16:21:15 Server pluto[5968]: ike_alg_register_enc: Activating OAKLEY_BLOWFISH_CBC: Ok (ret=0) May 31 16:21:15 Server pluto[5968]: ike_alg_register_hash: Activating OAKLEY_SHA2_256: Ok (ret=0) May 31 16:21:15 Server pluto[5968]: ike_alg_register_hash: Activating OAKLEY_SHA2_512: Ok (ret=0) May 31 16:21:15 Server pluto[5968]: ike_alg_register_enc: Activating OAKLEY_TWOFISH_CBC: Ok (ret=0) May 31 16:21:15 Server pluto[5968]: ike_alg_register_enc: Activating OAKLEY_SSH_PRIVATE_65289: Ok (ret=0) May 31 16:21:15 Server ipsec_setup: ...FreeS/WAN IPsec started May 31 16:21:15 Server ipsec_setup: ^M^[[80C^[[10D^[[1;32mdone^[[m^O May 31 16:21:15 Server pluto[5968]: Changing to directory '/etc/ipsec.d/cacerts' May 31 16:21:15 Server pluto[5968]: ; ; loaded cacert file 'cacert.pem' (1192 bytes) May 31 16:21:15 Server pluto[5968]: Changing to directory '/etc/ipsec.d/crls' May 31 16:21:15 Server pluto[5968]: ; ; loaded crl file 'crl.pem' (609 bytes) May 31 16:21:15 Server pluto[5968]: ; ; could not open my default X.509 cert file '/etc/x509cert.der' May 31 16:21:15 Server pluto[5968]: OpenPGP certificate file '/etc/pgpcert.pgp' not found May 31 16:21:16 Server kernel: SuSE-FW-ACCEPT IN=ppp0 OUT= MAC= SRC=217.228.156.29 DST=217.84.234.108 LEN=48 TOS=0x00 PREC=0x00 TTL=124 ID=51654 DF PROTO=TCP SPT=3001 DPT=4662 WINDOW=16384 RES=0x00 SYN URGP=0 OPT (020405AC01010402) May 31 16:21:16 Server pluto[5968]: | from whack: got --esp=3des May 31 16:21:16 Server pluto[5968]: | from whack: got --ike=3des May 31 16:21:16 Server pluto[5968]: ; ; loaded host cert file '/etc/ipsec.d/LarsCert.pem' (1005 bytes) May 31 16:21:16 Server pluto[5968]: added connection description "linux-n2n" May 31 16:21:16 Server pluto[5968]: listening for IKE messages May 31 16:21:16 Server pluto[5968]: adding interface ipsec0/ppp0 217.84.234.108 May 31 16:21:16 Server pluto[5968]: loading secrets from "/etc/ipsec.secrets" May 31 16:21:16 Server pluto[5968]: ; ; loaded private key file '/etc/ipsec.d/private/LarsKey.pem' (963 bytes) May 31 16:21:17 Server pluto[5968]: "linux-n2n" #1: initiating Main Mode May 31 16:21:18 Server pluto[5968]: "linux-n2n" #1: Peer ID is ID_DER_ASN1_DN: 'C=DE, L=G?ttingen, O=Private, OU=VPN, CN=User' May 31 16:21:18 Server pluto[5968]: "linux-n2n" #1: ISAKMP SA established May 31 16:21:18 Server pluto[5968]: "linux-n2n" #2: initiating Quick Mode RSASIG+ENCRYPT+TUNNEL+PFS May 31 16:21:18 Server vpn: + C=DE, L=G?ttingen, O=Private, OU=VPN, CN=User 192.168.1.0/24 == 217.84.238.42 -- 217.84.234.108 == 192.168.2.0/24 May 31 16:21:18 Server pluto[5968]: "linux-n2n" #2: sent QI2, IPsec SA established May 31 16:21:18 Server ipsec__plutorun: 104 "linux-n2n" #1: STATE_MAIN_I1: initiate May 31 16:21:18 Server ipsec__plutorun: 106 "linux-n2n" #1: STATE_MAIN_I2: sent MI2, expecting MR2 May 31 16:21:18 Server ipsec__plutorun: 108 "linux-n2n" #1: STATE_MAIN_I3: sent MI3, expecting MR3 May 31 16:21:18 Server ipsec__plutorun: 004 "linux-n2n" #1: STATE_MAIN_I4: ISAKMP SA established May 31 16:21:18 Server ipsec__plutorun: 112 "linux-n2n" #2: STATE_QUICK_I1: initiate May 31 16:21:18 Server ipsec__plutorun: 004 "linux-n2n" #2: STATE_QUICK_I2: sent QI2, IPsec SA established Der patch ist wie man in den Augaben sieht installiert. Die Rechner sind 400 MHz P2 mit 128 MB RAM, Betriebssystem ist jewails SuSE 8.2, fast identisch konfiguriert. Die Verbindungen sind: Server: conn p2n right=%any leftsubnet=192.168.1.0/24 conn n2n right=%any rightsubnet=192.168.2.0/24 leftsubnet=192.168.1.0/24 Client: conn linux-n2n auto=start left=%defaultroute leftcert=LarsCert.pem leftsubnet=192.168.2.0/24 leftupdown=/usr/lib/ipsec/updown right=servernname rightid="C=DE, L=Göttingen, O=Private, OU=VPN, CN=User" rightrsasigkey=%cert rightsubnet=192.168.1.0/24 Muss man vieleicht noch welche ports in den Firewall freigeben außer 50 und 500 UDP ?? Die Verbindung scheint zu klappen, die Routingtables sehen auch gut aus, aber man kann niemanden anpingen, von beiden seiten nicht. Gruß markus Thomas Preissler schrieb:
Hallo Markus,
* Markus schrieb am 31.05.2003:
Hallo
ich möchte meinen SuSE Rechner als VPN Gateway mit ipSec einrichten. Ich habe alles so eingerichtet wie in der c't 10/03 steht, und die Rechner
Auch eine eigene CA definiert? X.509-Patch eingespielt? Verwendest Du FreeS/WAN?
wählen sich auch ein und die routingstables sind auch richtig aber ich kann keinen Rechner einpingen. Beide Rechner haben DSL. Es sieht so aus als ob die pakete ärgendwo nicht weitergeleitet werden. Ich habe das netztwerk 192.168.1.0/24 und möchte ein externes netzwerk per VPN einbinden 192.168.2.0/124. Das ist die Routingtable: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 217.5.98.59 * 255.255.255.255 UH 0 0 0 ppp0 217.5.98.59 * 255.255.255.255 UH 0 0 0 ipsec0 192.168.2.0 * 255.255.255.0 U 0 0 0 eth1 192.168.1.0 217.5.98.59 255.255.255.0 UG 0 0 0 ipsec0 192.168.10.0 * 255.255.255.0 U 0 0 0 eth0 default 217.5.98.59 0.0.0.0 UG 0 0 0 ppp0
Ich habe in beiden Firewalls von den Rechnern ( sind zwi mit SuSE 8.2) in der SuSEfirewall die Ports 50 und 500 UDP freigegeben. Hat jemand eine Idee wodran das liegen kann ??
Konfigurationsdatei? Welches Betriessystem fährt der andere Rechner? Wie schnell sind die Rechner? Der erste Verbindungsaufbau kann bei einem 700er schon ein bisschen brauchen, d.h. so ca. 20 Sekunden.
Welchen Typ von Verbindung hast Du in der Konfiguration definiert? P2P, P2N oder N2N? Anfangs finde ich IMHO P2P einfacher umzusetzen.
Was sagt das Logfile auf dem Gateway? Passt da alles? Wenn ja, was sagt das Logfile auf dem Client?
In der Linux Enterprise waren da auch Artikel drin. Ausgaben: 04/03, 05/03, 06/03.
Um via W2K oder WXP auf einen FreeS/WAN-Gateway zuzugreifen sind X.509-Zertifikate notwendig, siehe c't 05/02.
Grüße, Tom, der auf PM nicht reagiert.