How to Open Port 80 in Oracle Cloud (OCI) and Allow HTTP Access
If your web server is running on an Oracle Cloud instance but not accessible from the internet, you likely need to open port 80 (HTTP).
In Oracle Cloud (OCI), you must configure both:
- Network Security Rules (Security List)
- Server Firewall (firewalld)
🌐 Step 1: Open Port 80 in Oracle Cloud (Security List)
- Go to your instance in Oracle Cloud Console.
- Find the VNIC section.
- Click on Public Subnet.
- Open the associated Security List.
- Add a new Ingress Rule with:
- Stateless: No
- Source: 0.0.0.0/0
- IP Protocol: TCP
- Source Port Range: All
- Destination Port Range: 80
This allows HTTP traffic from anywhere.
🔥 Step 2: Open Port 80 in Server Firewall (firewalld)
SSH into your instance and install firewalld (if not installed):
sudo apt install firewalld -y
Allow HTTP service:
sudo firewall-cmd --permanent --add-service=http
Or open port manually:
sudo firewall-cmd --permanent --add-port=80/tcp
Reload firewall:
sudo firewall-cmd --reload
🚀 Step 3: Start Your Web Server
Start your web server (NGINX, Apache, etc.):
sudo systemctl start nginx
Now access your server:
http://your-public-ip
❗ Common Issue
If port 80 is still not accessible:
- Check Security List rules again
- Ensure firewall is reloaded
- Verify service is running
- Check if port 80 is already in use
🔗 Related Guides
- How to open port 80 & 443 in FirewallD
- Check if a port is open in Linux
- Kill process running on a port
✅ You should now be able to access your Oracle Cloud server via HTTP.
Comments
Post a Comment