
Захотелось руководству соеденить 2 наших конторы. На одной стоит фря 6,3 с 2 сетевыми 195.195.195.195 наружу и 192.168.1.80 внутрь.
На второй конторе стоит страшно сказать WINXP Prof c 2 сетевыми картами 194.194.194.194 и 192.168.0.1.
Был поднят IPSEC
пересобрать ядро с поддержкой
# IPSEC
options IPSEC
options IPSEC_ESP
options IPSEC_DEBUG
поставить
router# cd /usr/ports/security/ipsec-tools/
router# make install clean
router# cat /etc/ipsec.conf
flush;
spdflush;
spdadd 195.195.195.195 194.194.194.194 any -P out ipsec esp/transport/195.195.195.195-194.194.194.194/require;
spdadd 194.194.194.194 195.195.195.195 any -P in ipsec esp/transport/194.194.194.194-195.195.195.195/require;
router# cat /usr/local/etc/racoon/racoon.conf
# $KAME: racoon.conf.in,v 1.18 2001/08/16 06:33:40 itojun Exp $
# "path" must be placed before it should be used.
# You can overwrite which you defined, but it should not use due to confusing.
path include "/usr/local/etc/racoon" ;
#include "remote.conf" ;
# search this file for pre_shared_key with various ID key.
path pre_shared_key "/usr/local/etc/racoon/psk.txt" ;
# racoon will look for certificate file in the directory,
# if the certificate/certificate request payload is received.
#path certificate "/usr/local/etc/racoon/cert" ;
# "log" specifies logging level. It is followed by either "notify", "debug"
# or "debug2".
#log debug;
log notify;
#
# "padding" defines some parameter of padding. You should not touch these.
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.
}
# if no listen directive is specified, racoon will listen to all
# available interface addresses.
listen
{
#isakmp ::1 [7000];
isakmp 195.195.195.195 [500];
#admin [7002]; # administrative's port by kmpstat.
#strict_address; # required all addresses must be bound.
}
# Specification of default various timer.
timer
{
# These value can be changed per remote node.
counter 2; # 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 10 sec;
phase2 10 sec;
}
remote anonymous
{
exchange_mode main;
doi ipsec_doi;
situation identity_only;
nonce_size 16;
lifetime time 480 min; # 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 60 min;
encryption_algorithm 3des;
authentication_algorithm hmac_md5;
compression_algorithm deflate;
}
router# cat /usr/local/etc/racoon/psk.txt
194.116.194.170 sekretpass
Владельцы и права доступа выставить оказалось важно иначе на принимало
router# chmod 600 /usr/local/etc/racoon/psk.txt
router# ll /usr/local/etc/racoon/psk.txt
-rw------- 1 root wheel 76 Jul 29 16:32 /usr/local/etc/racoon/psk.txt
запускаем racoon -F -v -f и начинаем пинговать
ping 194.194.194.194.
время установки туннеля от 5 секунд до 30 секунд. скорость работы 150 КЬ/сек на 700 Duron/128.
для настройки виндовой машины использовалась статья http://www.opennet.ru/base/net/bsd_win_vpn.txt.html, вернее её вторая половина
туннель великолепно работает.
Но теперь хочется большего) нужно из сети 192.168.1.0 попасть в 194.194.194.194, а из 192.168.0.0 на 195.195.195.195.
Подскажите как прописать роутинг? просто это мое слабое место и я в нем путаюсь сильно.