FreeBSD 5.2.1, Racoon 20030826a
Необходимо филиал подцепить к серверу центрального офиса по VPN IPSec.
Нечего не получается! Уже мозги сломал.Ситуация на текущий момент:
1. Сервер центрального офиса - вероятно Windows.
внешний адрес - xxx.xxx.xxx.xxx
внутренний адрес - 192.168.3.210
внутренняя сеть - 192.168.3.0/24
2. Сервер филиала - FreeBSD (я с траблами тут).
внешний адрес - yyy.yyy.yyy.yyy
внутренний адрес - 192.168.4.1
внутренняя сеть - 192.168.4.0/24
/etc/rc.conf:
gif_interfaces="gif0"
gifconfig_gif0="yyy.yyy.yyy.yyy xxx.xxx.xxx.xxx"
ifconfig_gif0="inet 192.168.4.1 192.168.3.210 netmask 255.255.255.0"
static_routes="vpn"
route_vpn="192.168.3.0/24 192.168.3.210"
export route_vpn
ipsec_enable="YES"
ipsec_file="/etc/ipsec.conf"
/etc/ipsec.conf:
flush;
spdflush;
spdadd 192.168.4.0/24 192.168.3.0/24 any -P \
out ipsec esp/transport/yyy.yyy.yyy.yyy-xxx.xxx.xxx.xxx/require;
spdadd 192.168.3.0/24 192.168.4.0/24 any -P \
in ipsec esp/transport/xxx.xxx.xxx.xxx-yyy.yyy.yyy.yyy/require;
/usr/local/etc/racoon/racoon.conf:
path include "/usr/local/etc/racoon" ;
path pre_shared_key "/usr/local/etc/racoon/psk.txt" ;
#path certificate "/usr/local/etc/cert" ;
log debug;
padding
{
maximum_length 20; # maximum padding length.
randomize off; # enable randomize length.
strict_check off; # enable strict check.
exclusive_tail off; # extract last one octet.
}
listen
{
#isakmp 192.168.3.210 [500];
}
timer
{
# These value can be changed per remote node.
counter 5; # maximum trying count to send.
interval 20 sec; # maximum interval to resend
persend 1; # the number of packets per a send.
# timer for waiting to complete each phase.
phase1 30 sec;
phase2 15 sec;
}
remote anonymous
{
exchange_mode main;
doi ipsec_doi;
situation identity_only;
my_identifier address;
nonce_size 16;
lifetime time 3600 sec; # sec,min,hour
initial_contact on;
support_proxy on;
proposal_check obey; # obey, strict or claim
proposal {
encryption_algorithm 3des;
hash_algorithm md5;
authentication_method pre_shared_key;
dh_group 1 ;
}
}
sainfo anonymous
{
pfs_group 1;
lifetime time 3600 sec;
encryption_algorithm 3des ;
authentication_algorithm hmac_md5;
compression_algorithm deflate ;
}
/usr/local/etc/racoon/psk.txt:
xxx.xxx.xxx.xxx ************