|
ru.unix.bsd- RU.UNIX.BSD ------------------------------------------------------------------ From : igor.potapenko 2:5020/400 14 Sep 2007 15:24:52 To : Andrey Ostanovsky Subject : Re: win xp <-> freebsd туннель l2tp с ipsec -------------------------------------------------------------------------------- On 14 сент, 11:35, Andrey Ostanovsky <Andrey.Ostanov...@f1957.n5030.z2.fidonet.org> wrote: > Hello igor! > > 14 Sep 07 11:29, you wrote to you: > > ip> ещё кое-что. > ip> если соеденить напрямую(кабелем в том же сегменте) - то всё работает > ip> около минуты, даже можно увидеть жёлтенький замочек в винде около > ip> иконки подключения. > ip> разницы я не улавливаю > ip> (т.е. соединение в разных сегментах и соединение в одном.) > > Минута - это примерное время жизни arp-записи в кэше? Может, просто > маршрутизация где-то отваливается? > > Andrey по поводу первой проблемы оказалось, что если форвардить пакеты фаерволом не получается, т.к. ipsec вставляет свой заголовок на основании таблиц маршрутизации, а значит в моей ситуации: у сервера 2 линка rl0 и rl1. клиент прописан через rl0, тогда приконнектиться к rl1 он не сможет. (коннект к фтп решался правилами fwd, route-to и т.д. ) по поводу второй проблемы, долго работать не получается, кажись racoon регенерит правила и меняет ключик это наблюдается не только в l2tp, но и, например, в самбе. скачать получается около 50mb при скорости ~3mb/s ========================== Sep 14 15:02:45 steel racoon: INFO: IPsec-SA established: ESP/ Transport 172.16.22.13[0]->172.16.22.100[0] spi=180150136(0xabcdf78) Sep 14 15:02:45 steel racoon: phase2(quick): 1189767765.955343 Sep 14 15:02:45 steel racoon: INFO: IPsec-SA established: ESP/ Transport 172.16.22.100[0]->172.16.22.13[0] spi=1002305368(0x3bbdf758) Sep 14 15:02:45 steel racoon: ERROR: such policy does not already exist: "172.16.22.13/32[0] 172.16.22.100/32[0] proto=any dir=in" Sep 14 15:02:45 steel racoon: ERROR: such policy does not already exist: "172.16.22.100/32[0] 172.16.22.13/32[0] proto=any dir=out" Sep 14 15:03:02 steel racoon: INFO: IPsec-SA expired: ESP/Transport 172.16.22.13[0]->172.16.22.100[0] spi=137502858(0x832208a) Sep 14 15:03:10 steel racoon: INFO: respond new phase 2 negotiation: 172.16.22.100[0]<=>172.16.22.13[0] Sep 14 15:03:10 steel racoon: alg_oakley_encdef_decrypt(3des klen=192 size=408): 0.000047 Sep 14 15:03:10 steel racoon: alg_oakley_hmacdef_one(hmac_sha1 size=384): 0.000035 Sep 14 15:03:10 steel racoon: INFO: Update the generated policy : 172.16.22.13/32[0] 172.16.22.100/32[0] proto=any dir=in Sep 14 15:03:10 steel racoon: phase2(???): 0.000602 Sep 14 15:03:10 steel racoon: oakley_dh_generate(MODP1024): 0.006110 Sep 14 15:03:10 steel racoon: alg_oakley_hmacdef_one(hmac_sha1 size=268): 0.000016 Sep 14 15:03:10 steel racoon: alg_oakley_encdef_encrypt(3des klen=192 size=272): 0.000025 Sep 14 15:03:10 steel racoon: phase2(quick R msg1): 0.006395 Sep 14 15:03:10 steel racoon: alg_oakley_encdef_decrypt(3des klen=192 size=24): 0.000023 Sep 14 15:03:10 steel racoon: alg_oakley_hmacdef_one(hmac_sha1 size=41): 0.000030 Sep 14 15:03:10 steel racoon: oakley_dh_compute(MODP1024): 0.008009 Sep 14 15:03:10 steel racoon: alg_oakley_hmacdef_one(hmac_sha1 size=169): 0.000029 Sep 14 15:03:10 steel racoon: alg_oakley_hmacdef_one(hmac_sha1 size=189): 0.000016 Sep 14 15:03:10 steel racoon: alg_oakley_hmacdef_one(hmac_sha1 size=189): 0.000014 Sep 14 15:03:10 steel racoon: alg_oakley_hmacdef_one(hmac_sha1 size=189): 0.000014 Sep 14 15:03:10 steel racoon: alg_oakley_hmacdef_one(hmac_sha1 size=169): 0.000014 Sep 14 15:03:10 steel racoon: alg_oakley_hmacdef_one(hmac_sha1 size=189): 0.000013 Sep 14 15:03:10 steel racoon: alg_oakley_hmacdef_one(hmac_sha1 size=189): 0.000013 Sep 14 15:03:10 steel racoon: alg_oakley_hmacdef_one(hmac_sha1 size=189): 0.000015 Sep 14 15:03:10 steel racoon: phase2(???): 0.010210 Sep 14 15:03:10 steel racoon: INFO: IPsec-SA established: ESP/ Transport 172.16.22.13[0]->172.16.22.100[0] spi=25017381(0x17dbc25) Sep 14 15:03:10 steel racoon: phase2(quick): 1189767790.546784 Sep 14 15:03:10 steel racoon: INFO: IPsec-SA established: ESP/ Transport 172.16.22.100[0]->172.16.22.13[0] spi=435088372(0x19eeebf4) Sep 14 15:03:10 steel racoon: ERROR: such policy does not already exist: "172.16.22.13/32[0] 172.16.22.100/32[0] proto=any dir=in" Sep 14 15:03:10 steel racoon: ERROR: such policy does not already exist: "172.16.22.100/32[0] 172.16.22.13/32[0] proto=any dir=out" Sep 14 15:03:10 steel racoon: alg_oakley_encdef_decrypt(3des klen=192 size=40): 0.000024 Sep 14 15:03:10 steel racoon: alg_oakley_hmacdef_one(hmac_sha1 size=20): 0.000025 Sep 14 15:03:10 steel racoon: INFO: generated policy, deleting it. Sep 14 15:03:10 steel racoon: INFO: purged IPsec-SA proto_id=ESP spi=1002305368. после чего не качает. проведенно 3 эксперимента, останавливалось на 15% все 3 раза. наверно есть какой-то лимит может я в конфиге где накосячил ===racoon.conf==== path certificate "/etc/openssl/cert"; #log debug2; # "padding" defines some padding parameters. 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 on all # available interface addresses. listen { isakmp 172.16.22.100 [500]; adminsock disabled; } 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 send. # maximum time to wait for completing each phase. phase1 30 sec; phase2 15 sec; } remote anonymous { exchange_mode main; #exchange_mode main,aggressive; doi ipsec_doi; situation identity_only; # ike_frag on; # use IKE fragmentation #kernel support! # esp_frag 552; # use ESP fragmentation at 552 bytes my_identifier asn1dn; peers_identifier asn1dn; verify_identifier off; certificate_type x509 "ipsec-server.crt" "ipsec-server.key"; ca_type x509 "ca.key"; peers_certfile x509 "ipsec-client-test.crt"; nonce_size 16; initial_contact on; proposal_check obey; # obey, strict, or claim proposal { encryption_algorithm 3des; hash_algorithm sha1; authentication_method rsasig; #authentication_method hybrid_rsa_server; dh_group 2; } passive on; generate_policy on; } sainfo anonymous { pfs_group 2; encryption_algorithm 3des; authentication_algorithm hmac_sha1; compression_algorithm deflate; } ================= #15:06 root@steel ...etc/racoon(0/3)# sysctl net.key net.key.debug: 0 net.key.spi_trycnt: 1000 net.key.spi_minval: 256 net.key.spi_maxval: 268435455 net.key.larval_lifetime: 30 net.key.blockacq_count: 10 net.key.blockacq_lifetime: 20 net.key.esp_keymin: 256 net.key.esp_auth: 0 net.key.ah_keymin: 128 net.key.preferred_oldsa: 0 --- ifmail v.2.15dev5.4 * Origin: http://groups.google.com (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.unix.bsd/709864b9b2370.html, оценка из 5, голосов 10
|