Здравствуйте.
После авторизации пользователя Active Directory при подключение через клиента Ngate сразу же динамическая тунель закрывается и VPN останавливается.
В логе клиента:
Oct 25 11:33:25.170 Debug Vx0000000009758910 New VPN session created.
Oct 25 11:33:25.170 Debug Vx0000000009758910 Authorizing and acquiring configuration
Oct 25 11:33:25.170 Debug Vx0000000009758910 Created http request 'GET
https://ngate.host.ru:711/ng_login_and_cln_tunnels' without any headers
Oct 25 11:33:25.205 Debug Vx0000000009758910 VPN session LoginTransaction SSL handshake succesful
Oct 25 11:33:25.227 Debug Vx0000000009758910 Received http reply '401 Unauthorized' with headers:
Oct 25 11:33:25.227 Debug Vx0000000009758910 Server:nginx
Oct 25 11:33:25.227 Debug Vx0000000009758910 Date:Mon, 25 Oct 2021 08:33:03 GMT
Oct 25 11:33:25.227 Debug Vx0000000009758910 Content-Type:text/html
Oct 25 11:33:25.227 Debug Vx0000000009758910 Transfer-Encoding:chunked
Oct 25 11:33:25.227 Debug Vx0000000009758910 Connection:keep-alive
Oct 25 11:33:25.227 Debug Vx0000000009758910 , with additional reply data:
Oct 25 11:33:25.227 Debug Failed to request login and tunnels (login): username or password fields are not provided
Oct 25 11:33:25.227 Debug
Oct 25 11:33:25.227 Debug CRTx0000000008e97270 Loaded and parsed succesfully
Oct 25 11:33:25.230 Debug CRTx0000000008e97270 Certificate valid
Oct 25 11:33:25.230 Critical Vx0000000009758910 VPN session LoginTransaction finished with error: AuthenticationRequiredError, Узел требует авторизацию
Oct 25 11:33:25.230 Critical Vx0000000009758910 Gateway requested authentication.Oct 25 11:33:25.230 Debug Vx0000000009758910 Unable to login to remote gate. VPN session closed.
Oct 25 11:33:25.231 Debug onFinish
Oct 25 11:33:36.265 Debug Credentials was entered by user. Start VPN session with added credentials.
Oct 25 11:33:36.266 Debug Vx0000000009758910 Authorizing and acquiring configuration
Oct 25 11:33:36.266 Debug Vx0000000009758910 Created http request 'POST
https://ngate.host.ru:711/ng_login_and_cln_tunnels' with headers:
Oct 25 11:33:36.266 Debug Vx0000000009758910 Content-Type:application/x-www-form-urlencoded
Oct 25 11:33:36.266 Debug Vx0000000009758910 Content-Length:46
Oct 25 11:33:36.266 Debug Vx0000000009758910 , with additional request data:
Oct 25 11:33:36.266 Debug username=XXXXXXXXXXXXX&password=YYYYYYYYYYYYYY
Oct 25 11:33:36.303 Debug Vx0000000009758910 VPN session LoginTransaction SSL handshake succesful
Oct 25 11:33:36.549 Debug Vx0000000009758910 Received http reply '200 OK' with headers:
Oct 25 11:33:36.550 Debug Vx0000000009758910 Server:nginx
Oct 25 11:33:36.550 Debug Vx0000000009758910 Date:Mon, 25 Oct 2021 08:33:15 GMT
Oct 25 11:33:36.550 Debug Vx0000000009758910 Content-Type:text/html
Oct 25 11:33:36.550 Debug Vx0000000009758910 Transfer-Encoding:chunked
Oct 25 11:33:36.550 Debug Vx0000000009758910 Connection:keep-alive
Oct 25 11:33:36.550 Debug Vx0000000009758910 Set-Cookie:nginxauth=UNgy+WA7sB+279axUXKkOvlsTIuNKyNuSJypHDi1lqk=:6k6pc3PDZiBju6p9hKvHaeVVvTkrqr2c5Xq1O5bwCfw
httponly; secure
Oct 25 11:33:36.550 Debug Vx0000000009758910 X-Frame-Options:SAMEORIGIN
Oct 25 11:33:36.550 Debug Vx0000000009758910 X-Content-Type-Options:nosniff
Oct 25 11:33:36.550 Debug Vx0000000009758910 X-XSS-Protection:1; mode=block
Oct 25 11:33:36.550 Debug Vx0000000009758910 Strict-Transport-Security:max-age=31536000; includeSubdomains;
Oct 25 11:33:36.550 Debug Vx0000000009758910 , with additional reply data:
Oct 25 11:33:36.550 Debug {
Oct 25 11:33:36.550 Debug "GateAddresses": [],
Oct 25 11:33:36.550 Debug "IPTunnels": [
Oct 25 11:33:36.550 Debug {
Oct 25 11:33:36.550 Debug "ClientAddress": "10.X.X.6",
Oct 25 11:33:36.550 Debug "DNSs": [
Oct 25 11:33:36.550 Debug "10.X.X.X",
Oct 25 11:33:36.550 Debug "10.X.X.X"
Oct 25 11:33:36.550 Debug ],
Oct 25 11:33:36.550 Debug "Description": "\u0422\u0443\u043d\u0435\u043b\u044c \u043a \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u0441\u0442\u0430\u043d\u0446\u0438\u044f\u043c",
Oct 25 11:33:36.550 Debug "DomainName": "dc.local",
Oct 25 11:33:36.550 Debug "GatewayAddress": "10.X.X.X",
Oct 25 11:33:36.550 Debug "MTU": 1470,
Oct 25 11:33:36.550 Debug "Name": "ngate",
Oct 25 11:33:36.550 Debug "Netmask": "255.255.248.0",
Oct 25 11:33:36.550 Debug "OnTunnelUp": {
Oct 25 11:33:36.550 Debug "OpenWebPageURL": "",
Oct 25 11:33:36.550 Debug "StartCommand": {
Oct 25 11:33:36.550 Debug "Linux": "",
Oct 25 11:33:36.550 Debug "MacOS": "",
Oct 25 11:33:36.550 Debug "Windows": ""
Oct 25 11:33:36.550 Debug }
Oct 25 11:33:36.550 Debug },
Oct 25 11:33:36.550 Debug "RemoteURI": "wss://ngate.host.ru:711/ngate/",
Oct 25 11:33:36.550 Debug "RoutingDomain": null,
Oct 25 11:33:36.550 Debug "SearchDomains": [
Oct 25 11:33:36.550 Debug "10.X.X.X",
Oct 25 11:33:36.550 Debug "10.X.X.X"
Oct 25 11:33:36.550 Debug ],
Oct 25 11:33:36.550 Debug "Subnets": [
Oct 25 11:33:36.550 Debug {
Oct 25 11:33:36.550 Debug "Netmask": "255.255.0.0",
Oct 25 11:33:36.550 Debug "Network": "10.x.0.0"
Oct 25 11:33:36.550 Debug }
Oct 25 11:33:36.550 Debug ],
Oct 25 11:33:36.550 Debug "grant_end_time": 1635183214,
Oct 25 11:33:36.550 Debug "grant_start_time": 1635150774
Oct 25 11:33:36.550 Debug }
Oct 25 11:33:36.550 Debug ],
Oct 25 11:33:36.550 Debug "TCPTunnels": [],
Oct 25 11:33:36.550 Debug "Version": "1"
Oct 25 11:33:36.550 Debug }
Oct 25 11:33:36.550 Debug CRTx0000000008e97270 Freeing 'CN=..., O=..., OU=..., L=..., ST=..., C=RU, Email=...Республика Марий Эл, C=RU, Email=it12@12.kadastr.ru' certificate from
https://ngate.host.ru:711
Oct 25 11:33:36.550 Debug CRTx0000000008c97d90 Loaded and parsed succesfully
Oct 25 11:33:36.552 Debug CRTx0000000008c97d90 Certificate valid
Oct 25 11:33:36.553 Debug Parsing JSON tunnels description file. File version "1"
Oct 25 11:33:36.554 Debug Vx0000000009758910 Gateway config parsed succesfully
Oct 25 11:33:36.554 Debug DTx00000000041b7800 Created new dynamic tunnel
Oct 25 11:33:36.554 Debug DTx00000000041b7800 Starting dynamic tunnel
Oct 25 11:33:36.555 Debug Vx0000000009758910 VPN session LoginTransaction finished
Oct 25 11:33:36.561 Critical DTx00000000041b7800 Unable to open TUN deviceOct 25 11:33:36.561 Debug DTx00000000041b7800 Stopping dynamic tunnel
Oct 25 11:33:36.562 Debug DTx00000000041b7800 Dynamic tunnel websocket connection closed (1000, CloseCodeNormal)
Oct 25 11:33:36.562 Debug DTx00000000041b7800 Destroyed dynamic tunnel
Oct 25 11:33:36.562 Critical Vx0000000009758910 Detected unexpectedly destroyed tunnel. Stopping VPN session.Oct 25 11:33:36.562 Debug Vx0000000009758910 VPN session termination requested.
Oct 25 11:33:36.563 Debug Vx0000000009758910 Created http request 'GET
https://ngate.host.ru:711/ng_tunnel_logout' with headers:
Oct 25 11:33:36.563 Debug Vx0000000009758910 Cookie:nginxauth=UNgy+WA7sB+279axUXKkOvlsTIuNKyNuSJypHDi1lqk=:6k6pc3PDZiBju6p9hKvHaeVVvTkrqr2c5Xq1O5bwCfw=
Oct 25 11:33:36.581 Debug Vx0000000009758910 VPN session LogoutTransaction SSL handshake succesful
Oct 25 11:33:36.642 Debug Vx0000000009758910 Received http reply '200 OK' with headers:
Oct 25 11:33:36.642 Debug Vx0000000009758910 Server:nginx
Oct 25 11:33:36.642 Debug Vx0000000009758910 Date:Mon, 25 Oct 2021 08:33:15 GMT
Oct 25 11:33:36.642 Debug Vx0000000009758910 Content-Type:text/html
Oct 25 11:33:36.642 Debug Vx0000000009758910 Transfer-Encoding:chunked
Oct 25 11:33:36.642 Debug Vx0000000009758910 Connection:keep-alive
Oct 25 11:33:36.642 Debug Vx0000000009758910 Set-Cookie:nginxauth=UNgy+WA7sB+279axUXKkOvlsTIuNKyNuSJypHDi1lqk=:6k6pc3PDZiBju6p9hKvHaeVVvTkrqr2c5Xq1O5bwCfw
httponly; secure; expires=Mon, 25-Oct-21 08:16:35 GMT
Oct 25 11:33:36.642 Debug Vx0000000009758910 X-Frame-Options:SAMEORIGIN
Oct 25 11:33:36.642 Debug Vx0000000009758910 X-Content-Type-Options:nosniff
Oct 25 11:33:36.642 Debug Vx0000000009758910 X-XSS-Protection:1; mode=block
Oct 25 11:33:36.642 Debug Vx0000000009758910 Strict-Transport-Security:max-age=31536000; includeSubdomains;
Oct 25 11:33:36.642 Debug CRTx0000000008c97d90 Freeing 'CN=..., O=..., OU=..., L=..., ST=..., C=RU, Email=...Республика Марий Эл, C=RU, Email=it12@12.kadastr.ru' certificate from
https://ngate.host.ru:711
Oct 25 11:33:36.642 Debug CRTx0000000008e973f0 Loaded and parsed succesfully
Oct 25 11:33:36.644 Debug CRTx0000000008e973f0 Certificate valid
Oct 25 11:33:36.644 Debug CRTx0000000008e973f0 Freeing 'CN=..., O=..., OU=..., L=..., ST=..., C=RU, Email=...' certificate from
https://ngate.host.ru:711
Oct 25 11:33:36.646 Debug onFinish
Oct 25 11:33:36.650 Debug Vx0000000009758910 VPN session LogoutTransaction finished
Oct 25 11:33:36.652 Debug Vx0000000009758910 VPN session destroyed.
в логах NGate
32_0_access.log:
10.12.200.199 - - [25/Oct/2021:11:33:03 +0300] "GET /ng_login_and_cln_tunnels HTTP/1.1" 401 4699 "-" "Mozilla/5.0" "-"
10.12.200.199 - - [25/Oct/2021:11:33:15 +0300] "POST /ng_login_and_cln_tunnels HTTP/1.1" 200 6952 "-" "Mozilla/5.0" "-"
10.12.200.199 - - [25/Oct/2021:11:33:15 +0300] "GET /ng_tunnel_logout HTTP/1.1" 200 612 "-" "Mozilla/5.0" "-"
32_0_ng-auth-backend.log:
2021-10-25T11:19:14.460889+03:00 ngate ng-auth-backend 27051: ERROR root MainThread 1 - user - 10.x.x.x None Authenticate user - Authentication failed! {'info': '80090308: LdapErr: DSID-0C09044E, comment: AcceptSecurityContext error, data 52e, v2580', 'desc': 'Invalid credentials'}
2021-10-25T11:19:14.462572+03:00 ngate ng-auth-backend 27051: ERROR root MainThread 1 - user - 10.x.x.x None Failed to create session - Username or password is incorrect
2021-10-25T11:22:22.063572+03:00 ngate ng-auth-backend 27055: ERROR root MainThread 1 - - username or password fields are not provided - Username or password are not provided
2021-10-25T11:27:43.992642+03:00 ngate ng-auth-backend 27073: ERROR root MainThread 1 - - username or password fields are not provided - Username or password are not provided
2021-10-25T11:28:11.131073+03:00 ngate ng-auth-backend 27086: ERROR root MainThread 1 - - username or password fields are not provided - Username or password are not provided
2021-10-25T11:28:15.623656+03:00 ngate ng-auth-backend 27087: ERROR root MainThread 1 - - username or password fields are not provided - Username or password are not provided
2021-10-25T11:33:03.688302+03:00 ngate ng-auth-backend 27104: ERROR root MainThread 1 - - username or password fields are not provided - Username or password are not provided
в 32_0_debug.log тоже встречается "Username or password are not provided":
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket handler for "/ng_login_and_cln_tunnels?", wev 1
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket dummy handler
2021/10/25 11:33:03 [debug] 22480#0: timer delta: 0
2021/10/25 11:33:03 [debug] 22480#0: worker cycle
2021/10/25 11:33:03 [debug] 22480#0: epoll timer: 60000
2021/10/25 11:33:03 [debug] 22480#0: epoll: fd:11 ev:0005 d:00007F939FA96A60
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket handler for "/ng_login_and_cln_tunnels?", wev 0
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket read handler
2021/10/25 11:33:03 [debug] 22480#0: *2574 event timer del: 11: 339650290
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket read data: wait:1
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket try to recv data 4096: "/ng_login_and_cln_tunnels?"
2021/10/25 11:33:03 [debug] 22480#0: *2574 recv: eof:0, avail:1
2021/10/25 11:33:03 [debug] 22480#0: *2574 recv: fd:11 60 of 4096
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket recv returned 60: "/ng_login_and_cln_tunnels?"
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket read line
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua read the final line part: "X-NG-Auth-Error-Msg: Username or password are not provided
"2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket receive done: wait:1, eof:0, uri:"/ng_login_and_cln_tunnels?"
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket waking up the current request (read)
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp operation done, resuming lua thread
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket calling prepare retvals handler 00005630124566D6, u:00000000406A0A30
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket receive return value handler
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua run thread, top:0 c:1
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua regex cache hit for match regex "([^:\s]+):\s*(.+)" with options "jo"
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua regex cache hit for match regex "^\s*$" with options "jo"
2021/10/25 11:33:03 [debug] 22480#0: *2574 regex "^\s*$" not matched on string "X-NG-Auth-Error-Msg: Username or password are not provided" starting from 02021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket calling receive() method
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket read timeout: 60000
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket read timeout: 60000
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua tcp socket read data: wait:0
2021/10/25 11:33:03 [debug] 22480#0: *2574 event timer add: 11: 60000:339650294
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua resume returned 1
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua thread yielded
2021/10/25 11:33:03 [debug] 22480#0: *2574 lua run thread returned -2
Подскажите куда копать, в чем проблема?
Отредактировано пользователем 26 октября 2021 г. 16:20:15(UTC)
| Причина: Не указана