I’m experiencing difficulties connecting to a Node.js application from a remote PC via a VPN. Despite configuring the application to listen on all interfaces (0.0.0.0) and allowing traffic on port 3000 through Windows Firewall rules, I’m unable to establish a successful connection from the remote PC.

Steps Taken:

The Node.js application is configured to listen on all interfaces:

const express = require('express');
const app = express();
const port = 3000;

app.listen(port, '0.0.0.0', () => {
  console.log(`Server is running on http://0.0.0.0:${port}`);
});

A rule has been created in the Windows Firewall to allow traffic on port 3000.

The VPN is properly established, and I can successfully ping the server machine from the remote PC.

Current Issue:

When attempting a TCP connection from the remote PC to port 3000 on the server’s IP address, I receive the following error message:

“WARNING: TCP connect failed.”

Trying to access the Node.js application from a browser results in

ERR_CONNECTION_TIMED_OUT

Additional Findings:

I can successfully ping the server machine from the remote PC.

Additional tests were conducted, such as checking that the Node.js application does not display error messages in the logs and confirming that there are no specific rules in Trend Micro antivirus blocking traffic on port 3000.

The Node.js application runs smoothly on the server’s PC, accessible both through localhost and the server’s IP.

Postman requests made on the server’s PC to the Node.js application are successful.

Question:

Any insights into why I’m unable to establish a successful connection via the VPN? What additional configurations or diagnostic steps can I take to resolve this issue?

2