0

So I have a little problem. I created two virtual machines - One is Windows 7 and the other is RedHat 6.4. I am trying to run the simplest server on the RedHat machine and then access it from the Windows 7 machine. The problem is that I can't seem to make it work!

This is my code (Simplest there is) :

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(8080);

Tried to listen(8080,"0.0.0.0" and "127.0.0.1"). Both didn't work.

When I try to access with from the RedHat machine with "wget" command it works, but when I try to go to the Windows 7 machine and enter from chrome or even with "telnet IP 8080" it doesn't work.

Both machines have access to the internet and I can also ping from each to other meaning there is connection between the two.

Also I added the port to the iptables in RedHat and I think I allowed it in the firewall aswell. Just added a new rule that allows all ports.

Any ideas on how to solve this? Thanks in advance!

2
  • .listen(8080); should work. Check firewall
    – Alexey Ten
    Jul 15, 2014 at 7:42
  • Can you specify what do I need to check in the firewall? I mean what should I do?
    – user232818
    Jul 15, 2014 at 7:47

0

You must log in to answer this question.

Browse other questions tagged .