Can't access Oracle Cloud Always Free Compute http port

Posted on Aug 29, 2022

Question

Yesterday, I was set up my first always free compute VM. I installed ubuntu 18.04 minimal on my VM. For my web service need, I installed Nginx. I'm confused because when I tried to access my public IP via a web browser, the Nginx welcome page didn't load. I think that is because port 80 didn't open. So, I tried to open that with set Ingress Rules in Security List Details menu as the picture below. Ingress Rule for port 80

But now, I still can't access the web server in my VM. May be there more experienced people in Oracle Cloud who can help me to solve this. Thank you

Answer

I wasted a lot of time on this. I wish I had found this first: https://docs.cloud.oracle.com/en-us/iaas/developer-tutorials/tutorials/apache-on-ubuntu/01oci-ubuntu-apache-summary.htm

  1. configure ingress route for port 80

  2. install ubuntu.

  3. install apache/nginx

  4. curl localhost should bring back webpage in text format, however fails over internet.

  5. forget ufw firewall - this may cause issues with the Oracle firewall

  6. use

$ sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT
$ sudo netfilter-persistent save
  1. test your web page over internet