I have a CentOS installed in VirtualBox. I have a web server running within it but for some reason I can't seem to be able to access it from outside.
The Ip address reported from CentOS is: 10.0.2.15 The web server is on port 8080.
I can curl 127.0.0.1:8080 and I get correct response (from CentOS).
Iptables is not running.
I have network enabled in VirtualBox (NAT) and I have set a forwarding rule 127.0.0.1,80,,8080
For some reason this does not get me anything. When I try to curl 127.0.0.1, I get: "curl: (7) Failed to connect to 127.0.0.1 port 80: Connection refused"
I also figured out that if I try to curl from Guest OS using it's public IP I still get the same error with connection refused.
Does anyone have any idea what I might be doing wrong?