Racoon-fritz: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) |
Thomas (Diskussion | Beiträge) (→Racoon) |
||
| (13 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
=Fritz= | =Fritz= | ||
| − | + | *vpn.cfg | |
| − | |||
| − | * | ||
<pre> | <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> | </pre> | ||
| + | =Racoon= | ||
*/etc/racoon.conf | */etc/racoon.conf | ||
<pre> | <pre> | ||
| Zeile 21: | Zeile 57: | ||
my_identifier fqdn zee.vpn.int; | my_identifier fqdn zee.vpn.int; | ||
proposal_check obey; | 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 { | proposal { | ||
encryption_algorithm aes; | encryption_algorithm aes; | ||
| Zeile 32: | Zeile 71: | ||
#pfs_group 2; | #pfs_group 2; | ||
lifetime time 1 hour ; | lifetime time 1 hour ; | ||
| − | encryption_algorithm | + | encryption_algorithm 3des ; |
authentication_algorithm hmac_sha1 ; | authentication_algorithm hmac_sha1 ; | ||
compression_algorithm deflate ; | compression_algorithm deflate ; | ||
| Zeile 38: | Zeile 77: | ||
</pre> | </pre> | ||
*/etc/racoon/psk.txt | */etc/racoon/psk.txt | ||
| − | 10. | + | 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.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
- 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/
- 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