Racoon-fritz: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „*https://www.ip-phone-forum.de/threads/fritzbox-mit-linux-vpn-verbinden-strongswan-openswan-racoon-anleitung-howto.283014/“)
 
 
(15 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
=Fritz=
 +
*vpn.cfg
 +
<pre>
 +
vpncfg {
 +
        connections {
 +
                enabled = yes;
 +
                conn_type = conntype_lan;
 +
                name = "fritz-racoon";
 +
                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 = "zee.vpn.int";
 +
                localid {
 +
                        fqdn = "fritzbox.vpn.int";
 +
                }
 +
                remoteid {
 +
                        fqdn = "zee.vpn.int";
 +
                }
 +
                mode = phase1_mode_aggressive;
 +
                phase1ss = "alt/aes/sha";
 +
                keytype = connkeytype_pre_shared;
 +
                key = "suxer";
 +
                cert_do_server_auth = no;
 +
                use_nat_t = no;
 +
                use_xauth = no;
 +
                use_cfgmode = no;
 +
                phase2localid {
 +
                        ipnet {
 +
                                ipaddr = 10.83.42.0;
 +
                                mask = 255.255.255.0;
 +
                        }
 +
                }
 +
                phase2remoteid {
 +
                        ipnet {
 +
                                ipaddr = 10.83.31.0;
 +
                                mask = 255.255.255.0;
 +
                        }
 +
                }
 +
                phase2ss = "esp-3des-sha/ah-no/comp-no/pfs";
 +
                accesslist = "permit ip any 10.83.31.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";
 +
        }
 +
</pre>
 +
=Racoon=
 +
*/etc/racoon.conf
 +
<pre>
 +
log debug;
 +
path pre_shared_key "/etc/racoon/psk.txt";
 +
 +
remote anonymous {
 +
        exchange_mode aggressive;
 +
        my_identifier fqdn zee.vpn.int;
 +
        proposal_check obey;
 +
        script "/etc/racoon/phase1-up.sh" phase1_up;
 +
        script "/etc/racoon/phase1-down.sh" phase1_down;
 +
        script "/etc/racoon/phase1-down.sh" phase1_dead;
 +
        proposal {
 +
                encryption_algorithm aes;
 +
                hash_algorithm sha1;
 +
                authentication_method pre_shared_key;
 +
                dh_group 2;
 +
        }
 +
}
 +
 +
sainfo address 10.83.31.0/24 any address 10.83.42.0/24 any {
 +
        #pfs_group 2;
 +
        lifetime time 1 hour ;
 +
        encryption_algorithm 3des ;
 +
        authentication_algorithm hmac_sha1 ;
 +
        compression_algorithm deflate ;
 +
}
 +
</pre>
 +
*/etc/racoon/psk.txt
 +
fritzbox.vpn.int suxer
 +
*/etc/racoon/phase1-up.sh
 +
<pre>
 +
#!/bin/bash
 +
REMOTE_NET="10.83.42.0/24"
 +
LOCAL_NET="10.83.31.0/24"
 +
setkey -c <<EOF
 +
spdadd $LOCAL_NET $REMOTE_NET any -P out ipsec
 +
    esp/tunnel/$LOCAL_ADDR-$REMOTE_ADDR/require;
 +
spdadd $REMOTE_NET $LOCAL_NET  any -P in ipsec
 +
    esp/tunnel/$REMOTE_ADDR-$LOCAL_ADDR/require;
 +
EOF
 +
</pre>
 +
*/etc/racoon/phase1-down.sh
 +
<pre>
 +
#!/bin/bash
 +
REMOTE_NET="10.83.42.0/24"
 +
LOCAL_NET="10.83.31.0/24"
 +
setkey -c <<EOF
 +
spddel $LOCAL_NET $REMOTE_NET any -P out ipsec
 +
    esp/tunnel/$LOCAL_ADDR-$REMOTE_ADDR/require;
 +
spddel $REMOTE_NET $LOCAL_NET  any -P in ipsec
 +
    esp/tunnel/$REMOTE_ADDR-$LOCAL_ADDR/require;
 +
EOF
 +
</pre>
 +
 +
=Links=
 +
*http://www.burth-online.de/cms/index.php/technik/fritzbox/49-vpn-konfigurationsdatei.html
 +
*https://blog.webernetz.net/ipsec-site-to-site-vpn-cisco-asa-avm-fritzbox/
 
*https://www.ip-phone-forum.de/threads/fritzbox-mit-linux-vpn-verbinden-strongswan-openswan-racoon-anleitung-howto.283014/
 
*https://www.ip-phone-forum.de/threads/fritzbox-mit-linux-vpn-verbinden-strongswan-openswan-racoon-anleitung-howto.283014/
 +
*http://www.computersalat.de/linux/vpn/ipsec-vpn-zwischen-fritzbox-und-linux/
 +
*http://www.kame.net/newsletter/20001119/
 +
*https://service.avm.de/help/de/FRITZ-Box-Fon-WLAN-7390/016/hilfe_syslog_122

Aktuelle Version vom 7. Dezember 2017, 11:19 Uhr

Fritz

  • vpn.cfg
vpncfg {
        connections {
                enabled = yes;
                conn_type = conntype_lan;
                name = "fritz-racoon";
                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 = "zee.vpn.int";
                localid {
                        fqdn = "fritzbox.vpn.int";
                }
                remoteid {
                        fqdn = "zee.vpn.int";
                }
                mode = phase1_mode_aggressive;
                phase1ss = "alt/aes/sha";
                keytype = connkeytype_pre_shared;
                key = "suxer";
                cert_do_server_auth = no;
                use_nat_t = no;
                use_xauth = no;
                use_cfgmode = no;
                phase2localid {
                        ipnet {
                                ipaddr = 10.83.42.0;
                                mask = 255.255.255.0;
                        }
                }
                phase2remoteid {
                        ipnet {
                                ipaddr = 10.83.31.0;
                                mask = 255.255.255.0;
                        }
                }
                phase2ss = "esp-3des-sha/ah-no/comp-no/pfs";
                accesslist = "permit ip any 10.83.31.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";
        }

Racoon

  • /etc/racoon.conf
log debug;
path pre_shared_key "/etc/racoon/psk.txt";

remote anonymous {
        exchange_mode aggressive;
        my_identifier fqdn zee.vpn.int;
        proposal_check obey;
        script "/etc/racoon/phase1-up.sh" phase1_up;
        script "/etc/racoon/phase1-down.sh" phase1_down;
        script "/etc/racoon/phase1-down.sh" phase1_dead;
        proposal {
                encryption_algorithm aes;
                hash_algorithm sha1;
                authentication_method pre_shared_key;
                dh_group 2;
        }
}

sainfo address 10.83.31.0/24 any address 10.83.42.0/24 any {
        #pfs_group 2;
        lifetime time 1 hour ;
        encryption_algorithm 3des ;
        authentication_algorithm hmac_sha1 ;
        compression_algorithm deflate ;
}
  • /etc/racoon/psk.txt
fritzbox.vpn.int suxer
  • /etc/racoon/phase1-up.sh
#!/bin/bash
REMOTE_NET="10.83.42.0/24"
LOCAL_NET="10.83.31.0/24"
setkey -c <<EOF
spdadd $LOCAL_NET $REMOTE_NET any -P out ipsec
    esp/tunnel/$LOCAL_ADDR-$REMOTE_ADDR/require;
spdadd $REMOTE_NET $LOCAL_NET  any -P in ipsec
    esp/tunnel/$REMOTE_ADDR-$LOCAL_ADDR/require;
EOF
  • /etc/racoon/phase1-down.sh
#!/bin/bash
REMOTE_NET="10.83.42.0/24"
LOCAL_NET="10.83.31.0/24"
setkey -c <<EOF
spddel $LOCAL_NET $REMOTE_NET any -P out ipsec
    esp/tunnel/$LOCAL_ADDR-$REMOTE_ADDR/require;
spddel $REMOTE_NET $LOCAL_NET  any -P in ipsec
    esp/tunnel/$REMOTE_ADDR-$LOCAL_ADDR/require;
EOF

Links