This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

VPN Einstellungen UTM9 -> Fritzbox 7360

Hallo erst einmal.

Ich versuche seit 2 Tagen eine VPN Verbindung zwischen einer ASG220 (neuse Firmware) und einer Fritzbox 7360 (neuse Firmware) einzurichten. 
Beide haben eine Dynamische IP und sind per DynDNS erreichbar. 

Config der Fritzbox

vpncfg {
        connections {
                enabled = yes;
                conn_type = conntype_lan;
                name = "AstaroASG220";
                always_renew = yes;
                reject_not_encrypted = no;
                dont_filter_netbios = yes;
                localip = 0.0.0.0;
                local_virtualip = 0.0.0.0;
                remoteip = 0.0.0.0;
                remote_virtualip = 0.0.0.0;
                remotehostname = "unt-astaro.homelinux.net";
                localid {
                        fqdn = "unt-tmp-fritz.homelinux.net";
                }
                remoteid {
                        fqdn = "unt-astaro.homelinux.net";
                }
                mode = phase1_mode_idp;
                phase1ss = "all/all/all";
                keytype = connkeytype_pre_shared;
                key = "geheim";
                cert_do_server_auth = no;
                use_nat_t = yes;
                use_xauth = no;
                use_cfgmode = no;
                phase2localid {
                        ipnet {
                                ipaddr = 172.30.0.0;
                                mask = 255.255.0.0;
                        }
                }
                phase2remoteid {
                        ipnet {
                                ipaddr = 192.168.0.0;
                                mask = 255.255.255.0;
                        }
                }
                phase2ss = "esp-all-all/ah-all/comp-all/pfs";
                accesslist = "permit ip any 192.168.0.0 255.255.255.0";
        }
        ike_forward_rules = "udp 0.0.0.0:500 0.0.0.0:500", 
                            "udp 0.0.0.0:4500 0.0.0.0:4500";
}


Config der UTM als Bild im Anhang

Das Log der Fritzbox enthält folgenden Fehler: VPN-Fehler: AstaroASG220, IKE-Error 0x1c

Im Live-Protokoll der UTM wird sehr viel angezeigt. (Kontrollverlauf und Kernel-Messaging an)

2013:07:24-10:58:08 FW01-1 pluto[22616]: | *received 92 bytes from 91.66.165.26:4500 on ppp0 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | ICOOKIE: 1d 5f 48 80 7d 99 f9 2e 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | RCOOKIE: c2 fb 5d 0f c9 48 f4 9d 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | peer: 5b 42 a5 1a 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | state hash entry 26 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | state object #80 found, in STATE_MAIN_R2 

2013:07:24-10:58:08 FW01-1 pluto[22616]: "S_unt-tmp-fritz.homelinux.net" #80: Peer ID is ID_FQDN: 'unt-tmp-fritz.homelinux.net' 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | peer CA: %none 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | S_unt-tmp-fritz.homelinux.net: no match (id: no, auth: ok, trust: ok, request: ok, prio: 2048) 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | D_REF_IpsRoaForIngoToInter: no match (id: no, auth: no, trust: no, request: ok, prio: 2048) 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | D_REF_IpsRoaForIngoToInter: no match (id: no, auth: no, trust: no, request: ok, prio: 2048) 

2013:07:24-10:58:08 FW01-1 pluto[22616]: "S_unt-tmp-fritz.homelinux.net" #80: no suitable connection for peer 'unt-tmp-fritz.homelinux.net' 

2013:07:24-10:58:08 FW01-1 pluto[22616]: "S_unt-tmp-fritz.homelinux.net" #80: sending encrypted notification INVALID_ID_INFORMATION to 91.66.165.26:500 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | state transition function for STATE_MAIN_R2 failed: INVALID_ID_INFORMATION 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | next event EVENT_RETRANSMIT in 1 seconds for #64 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | *received 476 bytes from 91.66.165.26:500 on ppp0 

2013:07:24-10:58:08 FW01-1 pluto[22616]: packet from 91.66.165.26:500: received Vendor ID payload [XAUTH] 

2013:07:24-10:58:08 FW01-1 pluto[22616]: packet from 91.66.165.26:500: received Vendor ID payload [Dead Peer Detection] 

2013:07:24-10:58:08 FW01-1 pluto[22616]: packet from 91.66.165.26:500: received Vendor ID payload [RFC 3947] 

2013:07:24-10:58:08 FW01-1 pluto[22616]: packet from 91.66.165.26:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-03] 

2013:07:24-10:58:08 FW01-1 pluto[22616]: packet from 91.66.165.26:500: ignoring Vendor ID payload [a2226fc364500f5634ff77db3b74f41b] 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | preparse_isakmp_policy: peer requests PSK authentication 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | creating state object #81 at 0x96b1fa8 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | ICOOKIE: ad 91 3a fc 3c 82 b1 7c 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | RCOOKIE: c3 9b ba ca 0c 66 58 02 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | peer: 5b 42 a5 1a 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | state hash entry 31 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | inserting event EVENT_SO_DISCARD, timeout in 0 seconds for #81 

2013:07:24-10:58:08 FW01-1 pluto[22616]: "S_unt-tmp-fritz.homelinux.net" #81: responding to Main Mode 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | inserting event EVENT_RETRANSMIT, timeout in 10 seconds for #81 

2013:07:24-10:58:08 FW01-1 pluto[22616]: | next event EVENT_RETRANSMIT in 1 seconds for #64 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | *received 300 bytes from 91.66.165.26:500 on ppp0 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | ICOOKIE: ad 91 3a fc 3c 82 b1 7c 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | RCOOKIE: c3 9b ba ca 0c 66 58 02 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | peer: 5b 42 a5 1a 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | state hash entry 31 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | state object #81 found, in STATE_MAIN_R1 

2013:07:24-10:58:09 FW01-1 pluto[22616]: "S_unt-tmp-fritz.homelinux.net" #81: NAT-Traversal: Result using RFC 3947: peer is NATed 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | inserting event EVENT_RETRANSMIT, timeout in 10 seconds for #81 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | next event EVENT_RETRANSMIT in 0 seconds for #64 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | *time to handle event 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | event after this is EVENT_RETRANSMIT in 0 seconds 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | handling event EVENT_RETRANSMIT for 91.66.165.26 "S_unt-tmp-fritz.homelinux.net" #64 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | inserting event EVENT_RETRANSMIT, timeout in 20 seconds for #64 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | next event EVENT_RETRANSMIT in 0 seconds for #63 

2013:07:24-10:58:09 FW01-1 pluto[22616]: | 


Wo liegt der Fehler? Oder was kann ich tun um den Fehler einzugrenzen?
Ich hoffe sehr Ihr könnt mir helfen!!!


This thread was automatically locked due to age.
  • Werde das heute Abend mal testen. Momentan ist etwas ungünstig.
  • JA!! 
    Habe gerade ganz mutig auf den Reconect Button gedrückt. Nach etwa 2 Minuten hatte ich eine neue öffentliche IP. Weite 2 Minuten später stand die VPN Verbindung wieder. 
    Ich weis auch nicht warum, aber es geht [:)]
  • FormerMember
    0 FormerMember in reply to taipan1005
    Vielen vielen Dank!!! 

    Es läuft!! Und was das beste ist, es läuft auch mit beidseitigem DynDNS. 
    Der Ausschlaggebende Hinweis, war die APIPA-Adesse (169.254.x.x), sowol in der Firitz Konfig als auch in der Gateway Konfig der Astaro.
    Für Leidensgenossen hier meine lauffähige Konfig der Fritzbox:


    vpncfg {
         connections {
                 enabled = yes;
                 conn_type = conntype_lan;
                 name = "FW01 Sophos";
                 always_renew = no;
                 reject_not_encrypted = no;
                 dont_filter_netbios = yes;
                 localip = 0.0.0.0;
                 local_virtualip = 0.0.0.0;
                 remoteip = 0.0.0.0;                
                 remote_virtualip = 0.0.0.0;
     remotehostname = "utm.homelinux.net";    //DynDNS der UTM
                 localid {
                         ipaddr =  169.254.1.100;  // APIPA-IP-Adresse, hie die gleiche nehmen wie in der UTM beim Remote Gateway konfiguriert
                 }
                 remoteid {
    fqdn = "utm.homelinux.net";
                 }
                 mode = phase1_mode_idp;
                 phase1ss = "alt/all-no-aes/all";
                 keytype = connkeytype_pre_shared;
                 key = "geheim";  
                 cert_do_server_auth = no;
                 use_nat_t = no;
                 use_xauth = no;
                 use_cfgmode = no;
                 phase2localid {
                         ipnet {
                                 ipaddr = 172.30.0.0;
                                 mask = 255.255.0.0;
                         }
                 }
                 phase2remoteid {
                         ipnet {
                                 ipaddr = 192.168.0.0;
                                 mask = 255.255.255.0;
                         }
                 }            
                 phase2ss = "esp-3des-sha/ah-no/comp-no/pfs";
                 accesslist = "permit ip any 192.168.0.0 255.255.255.0";
         }
         ike_forward_rules = "udp 0.0.0.0:500 0.0.0.0:500",
                             "udp 0.0.0.0:4500 0.0.0.0:4500";
    }


    Hallo taipan1005,

    ich bin auch schon seit Stunden dabei, meine Astaro UTM 9 mit der Fritzbox 7270 meiner Eltern per VPN zu verbinden.

    Ich habe deine Config soweit mal übernommen, jedoch klappt es bei mir nicht. Es baut sich einfach kein Tunnel auf. Muss ich noch etwas spezielles beachten?

    Würde mich über eine Antwort freuen :-)

    Grüße
    Pheon

    EDIT: Problem gelöst. Scheinbar kann nur die Fritzbox den VPN-Tunnel initiieren. Ich musste das Gateway in der Astaro auf "Nur antworten" stellen. Danach funktioniert es. Nun gibts nur noch ein Problem: Wenn der VPN getrennt wird, wird der Tunnel erst wieder aufgebaut, wenn auf der Seite der Fritzbox jemand einen Ping in Richtung Astaro absetzt. Trotz der Config-Option "always_renew = yes". Gibt es dazu einen Workaround?
  • Ne habe ich leider keine Idee. Ich war recht froh als es bei mir endlich lief. Bei mir war es dei APIPA-IP-Adresse. Diese muss bei der UTM und der Fritzbox gleich sein.
  • Hallo,


    damit die Fritzbox von sich aus immer brav die Verbindung neu initiiert, habe ich in ihr eine Dummy-Telefonnr. bei einem Dummy-VOIP-Provider im Netz der Astaro eingetragen.

    Die Fritzbox versucht alle paar Minuten sich dort zu registrieren und dadurch wird die Verbindung (wieder) aufgebaut.

    Gruss
    Xavier
  • Funktioniert einwandfrei mit meiner 7390 fritz OS6

    hatte schon fast verzweifelt [:)] 

    BIG THX !!!
  • Hallo zusammen,
    ich hab mich jetzt auch mal daran versucht. Leider stoße ich auf das ein oder andere Problem.
    Aktuell sind zwei Probleme für mich ersichtlich, leider habe ich jedoch noch keine Lösung dafür gefunden.
    Datei 1 sieht so aus:

    vpncfg {
         connections {
                 enabled = yes;
                 conn_type = conntype_lan;
                 name = "VPN1";
                 always_renew = yes;
                 reject_not_encrypted = no;
                 dont_filter_netbios = yes;
                 localip = 0.0.0.0;
                 local_virtualip = 0.0.0.0;
                 remoteip = ***.***.***.***; IP Adresse UTM
                 remote_virtualip = 0.0.0.0;
                 localid {
                         ipaddr =  169.254.1.100;
                 }
                 remoteid {
                         ipaddr = ***.***.***.***; IP Adresse UTM
                 }
                 mode = phase1_mode_idp;
                 phase1ss = "alt/all-no-aes/all";
                 keytype = connkeytype_pre_shared;
                 key = "geheim"; Key
                 cert_do_server_auth = no;
                 use_nat_t = no;
                 use_xauth = no;
                 use_cfgmode = no;
                 phase2localid {
                         ipnet {
                                 ipaddr = YYY.YYY.YYY.0; Netzwerk - FB
                                 mask = 255.255.255.0;
                         }
                 }
                 phase2remoteid {
                         ipnet {
                                 ipaddr = ZZZ.ZZZ.ZZZ.0; Netzwerk 1 - UTM (Vlan1)
                                 mask = 255.255.255.0;
                         }
                 }            
                 phase2ss = "esp-3des-sha/ah-no/comp-no/pfs";
                 accesslist =  "permit ip any ZZZ.ZZZ.ZZZ.0 255.255.255.0",  Netzwerk 1 - UTM (Vlan1)
    "permit ip any HHH.HHH.HHH.0 255.255.255.0"; Netzwerk 2 - UTM (Vlan2)
         }
         ike_forward_rules = "udp 0.0.0.0:500 0.0.0.0:500",
                             "udp 0.0.0.0:4500 0.0.0.0:4500";
    }


    Datei 2 sieht so aus:

    vpncfg {
         connections {
                 enabled = yes;
                 conn_type = conntype_lan;
                 name = "VPN2";
                 always_renew = yes;
                 reject_not_encrypted = no;
                 dont_filter_netbios = yes;
                 localip = 0.0.0.0;
                 local_virtualip = 0.0.0.0;
                 remoteip = 0.0.0.0;
                 remote_virtualip = 0.0.0.0;
     remotehostname = "X.X.de";             dyn Adresse UTM
                 localid {
                         ipaddr =  169.254.1.100;
                 }
                 remoteid {
                        fqdn = "X.X.de";          dyn Adresse UTM
                 }
                 mode = phase1_mode_idp;
                 phase1ss = "alt/all-no-aes/all";
                 keytype = connkeytype_pre_shared;
                 key = "geheim";          Key
                 cert_do_server_auth = no;
                 use_nat_t = no;
                 use_xauth = no;
                 use_cfgmode = no;
                 phase2localid {
                         ipnet {
                                 ipaddr = YYY.YYY.YYY.0;          Netzwerk - FB
                                 mask = 255.255.255.0;
                         }
                 }
                 phase2remoteid {
                         ipnet {
                                 ipaddr = ZZZ.ZZZ.ZZZ.0;          Netzwerk 1 - UTM (Vlan1)
                                 mask = 255.255.255.0;
                         }
                 }            
                 phase2ss = "esp-3des-sha/ah-no/comp-no/pfs";
                 accesslist =  "permit ip any ZZZ.ZZZ.ZZZ.0 255.255.255.0",  Netzwerk 1 - UTM (Vlan1)
    "permit ip any HHH.HHH.HHH.0 255.255.255.0"; Netzwerk 2 - UTM (Vlan2)
         }
         ike_forward_rules = "udp 0.0.0.0:500 0.0.0.0:500",
                             "udp 0.0.0.0:4500 0.0.0.0:4500";
    }


    Problem 1
    Mit Datei 1 bekomme ich eine Verbindung. Jedoch nur solange wie die externe IP meiner UTM stimmt.
    Mit Datei 2 bekomme ich leider keine Verbindung. Obwohl die die Adresse über Ping richtig aufgelöst wird.

    Problem 2
    Weder mit Datei 1 noch mit Datei 2 bekomme ich zu meinem zweiten Netzwerk Zugriff.
    Ich bekomme Zugriff zu dem Netzwerk ZZZ.ZZZ.ZZZ.0 jedoch nicht zu dem HHH.HHH.HHH.0

    Hat hier jemand die ein oder andere Idee?
    Vielen Dank!
  • @Skorpionking:

    Danke für die klasse Anleitung - damit hat es wunderbar geklappt.

    Leider habe ich aber mehrere Netze hinter der Sophos.

    Folgendes habe ich schon getestet, hatte aber nicht geklappt:

    - Mehrere Tunnel mit entsprechenden Netz.
    - Mehrere Gateway (eigene VPN-ID), entsprechender Tunnel und entsprechendes Netz
    - Mehrere Netze in dem Tunnel und einfach in der cfg Datei die entsprechenden Stellen umkopiert.

    Frage: Kannst du (oder natürlich jeder andere der mir helfen mag [:)]) mir sagen, ob man mehrere Netze hinter der Sophos mit der Fritzbox nutzen kann und wenn ja, wie?!?

    Danke für deine/eure Hilfe.
  • Ich hab mich daran auch mal versucht, hat aber nicht geklappt. Ich hab dann einfach eine zweite VPN-Verbindung für das zweite Net erstellt, damit gings dann.

    ----------
    Sophos user, admin and reseller.
    Private Setup:

    • XG: HPE DL20 Gen9 (Core i3-7300, 8GB RAM, 120GB SSD) | XG 18.0 (Home License) with: Web Protection, Site-to-Site-VPN (IPSec, RED-Tunnel), Remote Access (SSL, HTML5)
    • UTM: 2 vCPUs, 2GB RAM, 50GB vHDD, 2 vNICs on vServer (KVM) | UTM 9.7 (Home License) with: Email Protection, Webserver Protection, RED-Tunnel (server)
  • Hallo,

    ich habe jetzt beide Varianten getestet, mit fester und mit dyndns.
    Es funktioniert einfach nicht, die Fritte hat einen IKE Error 0x2027 und verbindet sich nicht.
    Ich weiß nicht mehr was ich noch machen soll..

    (Es handelt sich um eine 7490) und UTM ist 9.1.

    Kann es sein, dass trotz automatischer Firewallregeln von außen dicht ist?