Статус: Участник
Группы: Участники
Зарегистрирован: 31.08.2017(UTC) Сообщений: 21 Откуда: Moscow
|
Добрый день. Поставил сервер stunnel в докер образ ubuntu. Клиент стоит на windows 10 Оба запускаются, даже видят друг друга. Но запрос не пробрасывется из-за ошибок Лог со стороны сервера Код:2017.09.01 12:34:01 LOG7[236:140131655808832]: server accepted FD=8 from 172.17.0.1:34938
2017.09.01 12:34:01 LOG7[236:140131655808832]: server accepted FD=9 from 172.17.0.1:34936
2017.09.01 12:34:01 LOG7[236:140131582039808]: client start
2017.09.01 12:34:01 LOG7[236:140131582039808]: server started
2017.09.01 12:34:01 LOG7[236:140131582039808]: FD 9 in non-blocking mode
2017.09.01 12:34:01 LOG7[236:140131582039808]: FD 10 in non-blocking mode
2017.09.01 12:34:01 LOG7[236:140131582039808]: FD 11 in non-blocking mode
2017.09.01 12:34:01 LOG7[236:140131601147648]: client start
2017.09.01 12:34:01 LOG7[236:140131601147648]: server started
2017.09.01 12:34:01 LOG7[236:140131601147648]: FD 8 in non-blocking mode
2017.09.01 12:34:01 LOG7[236:140131601147648]: FD 11 in non-blocking mode
2017.09.01 12:34:01 LOG7[236:140131601147648]: FD 16 in non-blocking mode
2017.09.01 12:34:01 LOG7[236:140131582039808]: Connection from 172.17.0.1:34936 permitted by libwrap
2017.09.01 12:34:01 LOG5[236:140131582039808]: server connected from 172.17.0.1:34936
2017.09.01 12:34:01 LOG7[236:140131582039808]: accept_handshake start
2017.09.01 12:34:01 LOG7[236:140131582039808]: SSPINegotiate start
2017.09.01 12:34:01 LOG7[236:140131601147648]: Connection from 172.17.0.1:34938 permitted by libwrap
2017.09.01 12:34:01 LOG5[236:140131601147648]: server connected from 172.17.0.1:34938
2017.09.01 12:34:01 LOG7[236:140131601147648]: accept_handshake start
2017.09.01 12:34:01 LOG7[236:140131601147648]: SSPINegotiate start
2017.09.01 12:34:01 LOG7[236:140131655808832]: Cleaning up the signal pipe
2017.09.01 12:34:01 LOG6[236:140131655808832]: Child process 280 finished with code 0
2017.09.01 12:34:01 LOG6[236:140131655808832]: Child process 279 finished with code 0
2017.09.01 12:34:02 LOG7[236:140131582039808]: Reading in SSPINeg recv return=126, errno = 0
2017.09.01 12:34:02 LOG7[236:140131582039808]: Recieve 126 bytes from client on SSPINegotiateLoop
2017.09.01 12:34:02 LOG7[236:140131582039808]: AcceptSecurityContext finish, scRet = 590610
2017.09.01 12:34:02 LOG5[236:140131582039808]: Send 910 handshake bytes to client
2017.09.01 12:34:02 LOG7[236:140131582039808]: Reading in SSPINeg recv return=210, errno = -1
2017.09.01 12:34:02 LOG7[236:140131582039808]: Recieve 210 bytes from client on SSPINegotiateLoop
2017.09.01 12:34:02 LOG7[236:140131582039808]: AcceptSecurityContext finish, scRet = -2146893008
2017.09.01 12:34:02 LOG3[236:140131582039808]: Accept Security Context Failed with error code 0x80090330
2017.09.01 12:34:02 LOG3[236:140131582039808]: Couldn't accept client. Handshake failed
2017.09.01 12:34:02 LOG5[236:140131582039808]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
2017.09.01 12:34:02 LOG7[236:140131582039808]: free Buffers
2017.09.01 12:34:02 LOG7[236:140131582039808]: delete c->hContext
2017.09.01 12:34:02 LOG5[236:140131582039808]: incomp_mess = 0, extra_data = 0
2017.09.01 12:34:02 LOG7[236:140131582039808]: server finished (1 left)
2017.09.01 12:34:02 LOG7[236:140131601147648]: Reading in SSPINeg recv return=126, errno = 4
2017.09.01 12:34:02 LOG7[236:140131601147648]: Recieve 126 bytes from client on SSPINegotiateLoop
2017.09.01 12:34:02 LOG7[236:140131601147648]: AcceptSecurityContext finish, scRet = 590610
2017.09.01 12:34:02 LOG5[236:140131601147648]: Send 910 handshake bytes to client
2017.09.01 12:34:02 LOG7[236:140131601147648]: Reading in SSPINeg recv return=210, errno = -1
2017.09.01 12:34:02 LOG7[236:140131601147648]: Recieve 210 bytes from client on SSPINegotiateLoop
2017.09.01 12:34:02 LOG7[236:140131601147648]: AcceptSecurityContext finish, scRet = -2146893008
2017.09.01 12:34:02 LOG3[236:140131601147648]: Accept Security Context Failed with error code 0x80090330
2017.09.01 12:34:02 LOG3[236:140131601147648]: Couldn't accept client. Handshake failed
2017.09.01 12:34:02 LOG5[236:140131601147648]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
Лог со стороны клиента Код:[code=markup]2017.09.01 15:34:01 LOG7[2032:10440]: server accepted FD=452 from 127.0.0.1:64020
2017.09.01 15:34:01 LOG7[2032:10440]: Creating a new thread
2017.09.01 15:34:01 LOG7[2032:10440]: New thread created
2017.09.01 15:34:01 LOG7[2032:3480]: client start
2017.09.01 15:34:01 LOG7[2032:3480]: server started
2017.09.01 15:34:01 LOG7[2032:10440]: server accepted FD=552 from 127.0.0.1:64021
2017.09.01 15:34:01 LOG7[2032:10440]: Creating a new thread
2017.09.01 15:34:01 LOG7[2032:10440]: New thread created
2017.09.01 15:34:01 LOG7[2032:3480]: FD 452 in non-blocking mode
2017.09.01 15:34:01 LOG5[2032:3480]: server connected from 127.0.0.1:64020
2017.09.01 15:34:01 LOG7[2032:8112]: client start
2017.09.01 15:34:01 LOG7[2032:8112]: server started
2017.09.01 15:34:01 LOG7[2032:8112]: FD 552 in non-blocking mode
2017.09.01 15:34:01 LOG5[2032:8112]: server connected from 127.0.0.1:64021
2017.09.01 15:34:01 LOG7[2032:8112]: FD 632 in non-blocking mode
2017.09.01 15:34:01 LOG7[2032:8112]: server connecting
2017.09.01 15:34:01 LOG7[2032:3480]: FD 628 in non-blocking mode
2017.09.01 15:34:01 LOG7[2032:3480]: server connecting
2017.09.01 15:34:01 LOG7[2032:8112]: connect_wait: waiting 10 seconds
2017.09.01 15:34:01 LOG7[2032:3480]: connect_wait: waiting 10 seconds
2017.09.01 15:34:01 LOG7[2032:8112]: connect_wait: connected
2017.09.01 15:34:01 LOG7[2032:8112]: Remote FD=632 initialized
2017.09.01 15:34:01 LOG7[2032:3480]: connect_wait: connected
2017.09.01 15:34:01 LOG7[2032:3480]: Remote FD=628 initialized
2017.09.01 15:34:01 LOG7[2032:3480]: start SSPI connect
2017.09.01 15:34:01 LOG5[2032:3480]: try to read the client certificate
2017.09.01 15:34:01 LOG7[2032:8112]: start SSPI connect
2017.09.01 15:34:01 LOG5[2032:8112]: try to read the client certificate
2017.09.01 15:34:01 LOG7[2032:8112]: open file c:/Users/Eugene_Moiseev/Dev/app/stunnel/client.cer with certificate
2017.09.01 15:34:01 LOG7[2032:3480]: open file c:/Users/Eugene_Moiseev/Dev/app/stunnel/client.cer with certificate
2017.09.01 15:34:01 LOG5[2032:3480]: pincode option is present. Call CryptSetProvParam
2017.09.01 15:34:01 LOG5[2032:8112]: pincode option is present. Call CryptSetProvParam
2017.09.01 15:34:02 LOG5[2032:8112]: Call CryptSetProvParam(change ping) OK
2017.09.01 15:34:02 LOG3[2032:8112]: Credentials complete
2017.09.01 15:34:02 LOG7[2032:8112]: 126 bytes of handshake data sent
2017.09.01 15:34:02 LOG5[2032:8112]: 910 bytes of handshake(in handshake loop) data received.
2017.09.01 15:34:02 LOG5[2032:8112]: 210 bytes of handshake data sent
2017.09.01 15:34:02 LOG5[2032:3480]: Call CryptSetProvParam(change ping) OK
2017.09.01 15:34:02 LOG3[2032:3480]: Credentials complete
2017.09.01 15:34:02 LOG7[2032:3480]: 126 bytes of handshake data sent
2017.09.01 15:34:02 LOG3[2032:8112]: **** Server unexpectedly disconnected
2017.09.01 15:34:02 LOG3[2032:8112]: Error performing handshake
2017.09.01 15:34:02 LOG5[2032:8112]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
2017.09.01 15:34:02 LOG7[2032:8112]: free Buffers
2017.09.01 15:34:02 LOG7[2032:8112]: delete c->hContext
2017.09.01 15:34:02 LOG7[2032:8112]: delete c->hClientCreds
2017.09.01 15:34:02 LOG5[2032:3480]: 910 bytes of handshake(in handshake loop) data received.
2017.09.01 15:34:02 LOG7[2032:8112]: release c->opt->hProv
2017.09.01 15:34:02 LOG5[2032:8112]: incomp_mess = 0, extra_data = 0
2017.09.01 15:34:02 LOG7[2032:8112]: server finished (1 left)
2017.09.01 15:34:02 LOG5[2032:3480]: 210 bytes of handshake data sent
2017.09.01 15:34:02 LOG3[2032:3480]: **** Server unexpectedly disconnected
2017.09.01 15:34:02 LOG3[2032:3480]: Error performing handshake
2017.09.01 15:34:02 LOG5[2032:3480]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
2017.09.01 15:34:02 LOG7[2032:3480]: free Buffers
2017.09.01 15:34:02 LOG7[2032:3480]: delete c->hContext
2017.09.01 15:34:02 LOG7[2032:3480]: delete c->hClientCreds
2017.09.01 15:34:02 LOG7[2032:3480]: release c->opt->hProv
2017.09.01 15:34:02 LOG5[2032:3480]: incomp_mess = 0, extra_data = 0
2017.09.01 15:34:02 LOG7[2032:3480]: server finished (0 left)
2017.09.01 15:34:02 LOG7[2032:10440]: server accepted FD=1116 from 127.0.0.1:64024
2017.09.01 15:34:02 LOG7[2032:10440]: Creating a new thread
2017.09.01 15:34:02 LOG7[2032:10440]: New thread created
2017.09.01 15:34:02 LOG7[2032:10584]: client start
2017.09.01 15:34:02 LOG7[2032:10584]: server started
2017.09.01 15:34:02 LOG7[2032:10584]: FD 1116 in non-blocking mode
2017.09.01 15:34:02 LOG5[2032:10584]: server connected from 127.0.0.1:64024
2017.09.01 15:34:02 LOG7[2032:10584]: FD 620 in non-blocking mode
2017.09.01 15:34:02 LOG7[2032:10584]: server connecting
2017.09.01 15:34:02 LOG7[2032:10584]: connect_wait: waiting 10 seconds
2017.09.01 15:34:02 LOG7[2032:10584]: connect_wait: connected
2017.09.01 15:34:02 LOG7[2032:10584]: Remote FD=620 initialized
2017.09.01 15:34:02 LOG7[2032:10584]: start SSPI connect
2017.09.01 15:34:02 LOG5[2032:10584]: try to read the client certificate
2017.09.01 15:34:02 LOG7[2032:10584]: open file c:/Users/Eugene_Moiseev/Dev/app/stunnel/client.cer with certificate
2017.09.01 15:34:02 LOG5[2032:10584]: pincode option is present. Call CryptSetProvParam
2017.09.01 15:34:02 LOG5[2032:10584]: Call CryptSetProvParam(change ping) OK
2017.09.01 15:34:02 LOG3[2032:10584]: Credentials complete
2017.09.01 15:34:02 LOG7[2032:10584]: 126 bytes of handshake data sent
2017.09.01 15:34:02 LOG5[2032:10584]: 910 bytes of handshake(in handshake loop) data received.
2017.09.01 15:34:02 LOG5[2032:10584]: 210 bytes of handshake data sent
2017.09.01 15:34:02 LOG3[2032:10584]: **** Server unexpectedly disconnected
2017.09.01 15:34:02 LOG3[2032:10584]: Error performing handshake
2017.09.01 15:34:02 LOG5[2032:10584]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
2017.09.01 15:34:02 LOG7[2032:10584]: free Buffers
2017.09.01 15:34:02 LOG7[2032:10584]: delete c->hContext
2017.09.01 15:34:02 LOG7[2032:10584]: delete c->hClientCreds
2017.09.01 15:34:02 LOG7[2032:10584]: release c->opt->hProv
2017.09.01 15:34:02 LOG5[2032:10584]: incomp_mess = 0, extra_data = 0
2017.09.01 15:34:02 LOG7[2032:10584]: server finished (0 left)
[/code] Настройки сервера: Код:; Certificate/key is needed in server mode and optional in client mode
cert = /etc/stunnel/server.example.cer
pid = /etc/stunnel/server.pid
; Some debugging stuff useful for troubleshooting
debug = 7
output = /etc/stunnel/stunnel-server.log
[server]
accept = 443
connect = 10.8.210.29:8080
verify = 0
Настрйоки клиента Код:; Certificate/key is needed in server mode and optional in client mode
cert = c:/Users/Eugene_Moiseev/Dev/app/stunnel/client.cer
; Some debugging stuff useful for troubleshooting
debug = 7
output = c:/Users/Eugene_Moiseev/Dev/app/stunnel/client.log
[server]
client = yes
accept = 127.0.0.1:8084
connect = 127.0.0.1:8085
pincode = msv
verify = 0
Так и не понял в чем проблема. Помогите пожалуйста докер мапит внутренний порт 443 сервера на 127.0.0.1:8085, с этим все в порядке Отредактировано пользователем 1 сентября 2017 г. 15:49:34(UTC)
| Причина: Не указана
|
|
|
|
Статус: Сотрудник
Группы: Администраторы
Зарегистрирован: 16.09.2010(UTC) Сообщений: 1,449 Откуда: КРИПТО-ПРО
Сказал(а) «Спасибо»: 31 раз Поблагодарили: 417 раз в 308 постах
|
Автор: Eugene_Moiseev1 Но запрос не пробрасывется из-за ошибок Как уже упоминалось, попробуйте stunnel-msspi (с теми же самыми конфигами): https://github.com/deemru/stunnel/releases/latestВ логике конфигурации ошибок не видно, может докер вносит эффект, а может версия stunnel устарела на 5 лет. |
|
|
|
|
Статус: Сотрудник
Группы: Администраторы
Зарегистрирован: 16.09.2010(UTC) Сообщений: 1,449 Откуда: КРИПТО-ПРО
Сказал(а) «Спасибо»: 31 раз Поблагодарили: 417 раз в 308 постах
|
Да, ещё вариант убрать у клиента cert, так как verify = 0
|
|
|
|
|
Статус: Участник
Группы: Участники
Зарегистрирован: 31.08.2017(UTC) Сообщений: 21 Откуда: Moscow
|
Автор: pd Автор: Eugene_Moiseev1 Но запрос не пробрасывется из-за ошибок Как уже упоминалось, попробуйте stunnel-msspi (с теми же самыми конфигами): https://github.com/deemru/stunnel/releases/latestВ логике конфигурации ошибок не видно, может докер вносит эффект, а может версия stunnel устарела на 5 лет. Не очень понял как использовать stunnel-msspi при установке на linux я устанавливал пакет Код:alien -kci cprocsp-stunnel-64-3.9.0-4.x86_64.rpm
Теперь нужно вместо него установить stunnel-msspi который в лежит в архиве tgz? И на windows вместо exe который указан у вас на сайте https://www.cryptopro.ru...tunnel/stunnel_win32.zipиспользовать exe из той сслыке что вы мне дали? Вариант убрать cert не помог, вылетал клиент , пришлось убрать и pincode, и после ошибка осталась прежней Отредактировано пользователем 1 сентября 2017 г. 16:18:40(UTC)
| Причина: Не указана
|
|
|
|
Статус: Сотрудник
Группы: Администраторы
Зарегистрирован: 16.09.2010(UTC) Сообщений: 1,449 Откуда: КРИПТО-ПРО
Сказал(а) «Спасибо»: 31 раз Поблагодарили: 417 раз в 308 постах
|
Автор: Eugene_Moiseev1 Не очень понял как использовать stunnel-msspi Для unix и windows в архивах просто исполняемые файлы. |
|
|
|
|
Быстрый переход
Вы не можете создавать новые темы в этом форуме.
Вы не можете отвечать в этом форуме.
Вы не можете удалять Ваши сообщения в этом форуме.
Вы не можете редактировать Ваши сообщения в этом форуме.
Вы не можете создавать опросы в этом форуме.
Вы не можете голосовать в этом форуме.
Important Information:
The Форум КриптоПро uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close