Node.js webserver not reachable from external IP on Ubuntu 22

37 Views Asked by At

I'm running a Node.js webserver on Ubuntu 22.04.2 LTS. The server is a dedicated server from Hetzner. The webserver is reachable from the local network, but not by using the external IP.

The Node.js code looks like:

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Simple server\n');
}).listen(8080, "0.0.0.0");
console.log('Server running');

iptables configuration:

sudo iptables -I INPUT -p tcp -m tcp --dport 8080 -j ACCEPT

the ufw firewall is inactive and the Hetzner firewall is configured to allow all traffic. Any idea what the issue could be?

Thanks!

0

There are 0 best solutions below