< /p>
curl http://159.203.0.5
Performing the same operation outside the VM failed-connection timed out.
The port is open:
root@production01:~# ufw status
Status: active
To Action From
-- ------ ----
22 ALLOW Anywhere
80 ALLOW Anywhere
443 ALLOW Anywhere
22 (v6) ALLOW Anywhere (v6)
80 (v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)
and nginx is listening on the external interface:
root@production01:~# netstat -an | grep "LISTEN "
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2003 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0: 2004 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 0.0 .0.0:443 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2812 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8002 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::25 :::* LISTEN
What else is there?
Look at this:
foo@bar:~$curl 159.203.0.5 -v
* Rebuilt URL to: 159.203 .0.5/
* Hostname was NOT found in DNS cache
* Trying 159.203.0.5...
* Connected to 159.203.0.5 (159.203.0.5) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 159.203.0.5
> Accept: */*
>
< HTTP/1.1 404 Not Found
< X-Powered-By: Express
< X-Content-Type-Options: nosniff
< Content-Type: text/html; charset=utf -8
< Content-Length: 13
< Date: Tue, 02 Feb 2016 17:36:31 GMT
< Connection: keep-alive
<
Cannot GET /
* Connection #0 to host 159.203.0.5 left intact
I have no timeout, this 404 is no problem for me.
< p>On the hosted Ubuntu VM, I run nginx of http and https, and I can access those using public IP from the VM:
curl http: //159.203.0.5
Performing the same operation outside the VM failed-connection timed out.
The port is open:
root @production01:~# ufw status
Status: active
To Action From
-- ------ ----
22 ALLOW Anywhere
80 ALLOW Anywhere
443 ALLOW Anywhere
22 (v6) ALLOW Anywhere (v6)
80 ( v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)
and nginx is listening on the external interface:
root @production01:~# netstat -an | grep "LISTEN "
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2003 0.0.0.0:* LISTEN < br />tcp 0 0 0.0.0.0:2004 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0 :* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:281 2 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8002 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::25 :::* LISTEN
What else?
I think the problem is not on the VM, but on the machine you are trying to connect to the VM. Are other connections on this machine working properly?
Look at this:
foo@bar:~$curl 159.203.0.5 -v
* Rebuilt URL to: 159.203 .0.5/
* Hostname was NOT found in DNS cache
* Trying 159.203.0.5...
* Connected to 159.203.0.5 (159.203.0.5) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 159.203.0.5
> Accept: */*
>
< HTTP/1.1 404 Not Found
< X-Powered-By: Express
< X-Content-Type-Options: nosniff
< Content-Type: text/html; charset=utf -8
< Content-Length: 13
< Date: Tue, 02 Feb 2016 17:36:31 GMT
< Connection: keep-alive
<
Cannot GET /
* Connection #0 to host 159.203.0.5 left intact
I have no timeout, this 404 is no problem for me.
p>