Mittwoch, 24. April 2019

[FRITZBOX][VPN][SOPHOS XG] IPSec VPN Site to Site zwischen Sophos XG und einer Fritzbox

Auf der Sophos XG folgende VPN Einstellungen:

IPsec policies -> Neu

Name: Fritzbox

IKEv1
Main Mode

Re-key connection: ein
Pass data in compressed format: ein

Phase 1:
DH Group 2
Encryption: 3DES, AES128, AES256
Authentication: SHA1, SHA1,SHA1

Phase 2:
DH Group 2

Encryption: 3DES, AES128, AES256
Authentication: SHA1, SHA1,SHA1


IPsec connection -> Neu

IPv4
Activate on save
Site to site
Initiate the connection bzw. respond only

Policy: Fritzbox (siehe oben)
Authentication type: Preshared Key

Local Gateway:
Port wählen (meist Port 2)
Local ID type: IP Adress
Local ID: x.x.x.x (eure WAN IP)
Local subnet:
z.B.: LAN_SUBNET (ggf. ein Objekt erstellen)

Remote gateway:
adress: x.x.x.x (WAN IP der Fritzbox)
Remote ID type: IP Adresse oder DNS
Remote ID: x.x.x.x (WAN IP der Fritzbox) oder DNS (z.B. xy.dyndns.org)
Remote subnet: VPN_XX_SUBNET (object des entfernten Netzwerks erstellen)



Auf der Fritzbox könnt Ihr diese VPN Config Datei einfach hochladen:

Internet -> Freigaben -> VPN -> VPN Einstellungen importieren

Edit:
/teilweise funktioniert phase2ss = "esp-all-all/ah-none/comp-all/no-pfs"; besser, mit P1: DH2, DES, MD5 P2: DES / MD5 und 28800 Lifetimes

Rot markiertes anpassen! Einfach in einer .cfg oder .txt Datei speichern


vpncfg {
     connections {
             enabled = yes;
             conn_type = conntype_lan;
             name = "SophosXG";
             always_renew = yes;                //kann auf "no" wenn die VPN nur bei gebrauch genutzt werden soll
             reject_not_encrypted = no;
             dont_filter_netbios = yes;
             localip = 0.0.0.0;
             local_virtualip = 0.0.0.0;
             remoteip = X.X.X.X;                 //Feste WAN IP der XG
             remote_virtualip = 0.0.0.0;
             localid {
                     ipaddr =  X.X.X.X;        // WAN IP der Fritzbox, hie die gleiche nehmen wie in der XG beim Remote Gateway konfiguriert, alternativ: fqdn = "xy.dyndns.org";
             }
             remoteid {
                     ipaddr = X.X.X.X;                  //Feste IP der XG
             }
             mode = phase1_mode_idp;
             phase1ss = "alt/all-no-aes/all";
             keytype = connkeytype_pre_shared;
             key = "XXXX";      //Hier muss der Preshared Key rein, wie auf der XG im IPsec connection eingetragen
             cert_do_server_auth = no;
             use_nat_t = no;
             use_xauth = no;
             use_cfgmode = no;
             phase2localid {
                     ipnet {
                             ipaddr = X.X.X.X;                 //Internes Netz der FritzBox
                             mask = 255.255.255.0;
                     }
             }
             phase2remoteid {
                     ipnet {
                             ipaddr = X.X.X.X;           //Internes Netz der XG
                             mask = 255.255.255.0;
                     }
             }           
             phase2ss = "esp-3des-sha/ah-no/comp-no/pfs";         
             accesslist = "permit ip any X.X.X.X 255.255.255.0";      //Internes Netz der XG
     }
     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";
}

Keine Kommentare:

Kommentar veröffentlichen