Configuring web server (Windows 2019) with NAT instance

0

We have configured a fully functional Web server (Windows 2019) on a VPC behind a NAT instance (linux ami).
A domain name points to NAT instance, and the web server works great.

Running into an issue after we added reCaptcha on the login page.
It seems that it's not getting validation and timing out -- we have both v3 and v2 implemented.
I think this is a networking issue on the Windows 2019 instance, but not sure what exactly it is.
When I RDP to the Web server, and open a browser, I can't seem to get access to the internet out.
But the web application is successfully served through the web server via the NAT.

Since everything else is working on the vpc, routing tables, internet gateway on the AWS end, I don't think there are any issues there.
I can launch the same web server without the NAT instance by itself, and the reCaptcha works.
It only fails when it's launched behind the NAT.

Appreciate help and direction on resolving the reCaptcha issue.

Edited by: kkcan on Dec 8, 2020 2:30 PM

kkcan
已提問 3 年前檢視次數 278 次
1 個回答
0

Solution was making the recaptcha call asynchronous by setting async: true

grecaptcha.ready(function () {
grecaptcha.execute('@reCaptchav3SiteKey', { action: 'submit' }).then(function (token) {
console.log('v3 token: ' + token);
$('#CaptchaVersion').val('v3');
$('#CaptchaToken').val(token);
var postData = { token: token, version: 'v3' };
$.ajax({
type: 'POST',
async: true,
.... .... .... ...

kkcan
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南