Здравствуйте, All
Поискал на форуме и не нашел решения своей проблемы.
Постановка задачи
0) надо установить VPN с удаленным центром из нашего филиала
--- Ну почему это НЕ работает ?!Условия
1) Сервер центрального офиса - Linux
На нем установлен FreeS/WAN
внешний адрес - xxx.xxx.xxx.xxx
внутренний адрес - 10.198.3.5
внутренняя сеть - 10.198.3.0/24
2) Сервер филиала - FreeBSD (я с траблами тут).
внешний адрес - yyy.yyy.yyy.yyy
внутренний адрес - 192.168.159.12
внутренняя сеть - 192.168.159.0/24
3) их админ прислал записку, типа, настройте ваш FreeS/WAN
<
conn filial
type=tunnel
left=yyy.yyy.yyy.yyy
leftsubnet=192.168.159.0/24
right=xxx.xxx.xxx.xxx
rightsubnet=10.198.3.0/24
auto=start
- and in /etc/ipsec.secrets (chmod 600 /etc/ipsec.secrets)
yyy.yyy.yyy.yyy xxx.xxx.xxx.xxx: PSK "slovo"
>
Мои конфиги (не судите строго за множество фильтров)
4) /etc/rc.conf:
gif_interfaces="gif0"
gifconfig_gif0="yyy.yyy.yyy.yyy xxx.xxx.xxx.xxx"
ifconfig_gif0="inet 192.168.159.12 10.198.3.5 netmask 255.255.255.0"
static_routes="vpn"
route_vpn="10.198.3.0/24 10.198.3.5"
export route_vpn
usbd_enable="YES"
LINUX_ENABLE="YES"
gateway_enable="YES"
named_enable="YES"
ipfilter_enable="YES" # Set to YES to enable ipfilter functionality
ipfilter_program="/sbin/ipf" # where the ipfilter program lives
ipfilter_rules="/etc/ipf.rules" # rules definition file for ipfilter, see
ipfilter_flags="" # additional flags for ipfilter
ipnat_enable="YES" # Set to YES to enable ipnat functionality
ipnat_program="/sbin/ipnat" # where the ipnat program lives
ipnat_rules="/etc/ipnat.rules" # rules definition file for ipnat
ipnat_flags="" # additional flags for ipnat
firewall_enable="YES"
firewall_script="/etc/ipfw.rules"
inetd_enable="YES"
sendmail_enable="YES"
sshd_enable="YES"
local_startup="/usr/local/etc/rc.d"
ipsec_enable="YES"
ipsec_file="/etc/ipsec.conf"
racoon_enable="YES"
racoon_flags="-l /usr/local/etc/racoon/racoon.log" # лог рядом с конфигом
5) ipsec.conf:
#delete all existing entries from the SAD and SPD databases
flush;
spdflush;
#add the policy to the SPD database
spdadd 192.169.159.0/24 10.198.3.0/24 any -P out ipsec
esp/tunnel/yyy.yyy.yyy.yyy-xxx.xxx.xxx.xxx/require;
spdadd 10.198.3.0/24 192.168.159.0/24 any -P in ipsec
esp/tunnel/xxx.xxx.xxx.xxx-yyy.yyy.yyy.yyy/require;
6) racoon.conf
path include "/usr/local/etc/racoon" ;
path pre_shared_key "/usr/local/etc/racoon/psk.txt" ;
log debug2;
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 yyy.yyy.yyy.yyy [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 60 sec;
phase2 60 sec;
}
remote anonymous {
exchange_mode aggressive,main;
doi ipsec_doi;
situation identity_only;
nonce_size 16;
lifetime time 36 hour; # 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 2;
}
}
sainfo anonymous {
pfs_group 1;
lifetime time 36 hour;
encryption_algorithm 3des,des,cast128,blowfish;
authentication_algorithm hmac_sha1,hmac_md5;
compression_algorithm deflate ;
}
7) psk.txt (chmod 0600 psk.txt && chown root:wheel psk.txt)
xxx.xxx.xxx.xxx slovo
8) конфиги фильтров - все разрешено уже в поисках истины :-(
Пожалуйста, помогите советом (курю мануалы - пока бесполезно)