Unable to connect to Linux Ubuntu Azure VM using public IP address.
I have tried everything.
- have 'ufw' active and allowed port 80
username@LinuxLR:\~$ sudo ufw status
Status: active
​
To Action From
\-- ------ ----
80 ALLOW Anywhere
443 ALLOW Anywhere
Nginx HTTP ALLOW Anywhere
80 (v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)
Nginx HTTP (v6) ALLOW Anywhere (v6)
- done something I found about hard-enabling traffic on port 80
sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT
- tested with local host. "curl localhost" grabs the html on the page. "curl public ip address" doesn't give a response. Literally nothing happens.
username@LinuxLR:\~$ curl http://127.0.0.1/
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="[http://nginx.org/](http://nginx.org/)">nginx.org</a>.<br/>
Commercial support is available at
<a href="[http://nginx.com/](http://nginx.com/)">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>```
4. Similar thing with wget. "wget localhost" grabs the usual nginx html page. "wget public ip address" does:
```username@LinuxLR:\~$ wget "public ip address"
\--2022-10-19 19:40:43-- "public ip address"
Connecting to "public ip address"... failed: Connection timed out.
Retrying.