OCI Networking guide: how to Access Web Application Running in Private Subnet from Public Internet
After trying multiple solutions online, I still can't figure this out. I'm sure I'm missing something obvious here, but I'm currently deploying a web application using Oracle Cloud Infrastructure (OCI) and have it configured to run on a Compute instance inside a private subnet... However, I'm working with difficulties accessing the application from the public internet. I've set up a NAT gateway for outbound internet access, but I still need to reach the application. Here's the relevant part of my configuration: - **Subnet Configuration**: The private subnet has no public IP assigned to the instance. - **Security Lists**: I've added an ingress rule to allow traffic on port 80 from my public IP, but I need to seem to get through. The rule looks like this: ```json { "protocol": "6", "source": "<MY_PUBLIC_IP>/32", "destination": "0.0.0.0/0", "sourcePortRange": null, "destinationPortRange": "80" } ``` - **Route Table**: The route table for the private subnet has the default route pointing to the local VCN, and the NAT gateway is associated with the public subnet. I've double-checked the instance's firewall settings and verified that it is listening on port 80 using `curl http://localhost`, which works perfectly. However, trying to access the application via `http://<INSTANCE_PUBLIC_IP>` gives me a timeout behavior. I even tried running the application on port 8080 just to rule out any issues with port 80, but that didn't help either. I've also looked into the instance's logs for any signs of incoming requests but found nothing. Can anyone guide me on what might be going wrong? Is there any configuration that I might have missed in the OCI setup for this kind of architecture? I'd really appreciate any guidance on this.