Racoon-fritz: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) (→Racoon) |
Thomas (Diskussion | Beiträge) |
||
| Zeile 1: | Zeile 1: | ||
=Fritz= | =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 = 10.84.252.31; | ||
| + | remote_virtualip = 0.0.0.0; | ||
| + | localid { | ||
| + | fqdn = "fdorf.webernetz.net"; | ||
| + | } | ||
| + | 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= | =Racoon= | ||
*/etc/racoon.conf | */etc/racoon.conf | ||
Version vom 5. Dezember 2017, 19:05 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 = 10.84.252.31;
remote_virtualip = 0.0.0.0;
localid {
fqdn = "fdorf.webernetz.net";
}
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 aes ;
authentication_algorithm hmac_sha1 ;
compression_algorithm deflate ;
}
- /etc/racoon/psk.txt
10.84.252.33 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