Open ports in Oracle Cloud instances
Ports other than 22 are closed in Oracle Cloud OS images in default. You need to open ports in IPTABLES.
If you want to open 80 and 443:
- Edit the /etc/iptables/rules.v4
nano /etc/iptables/rules.v4
- Add this line below the line that opens the port 22:
-A INPUT -p tcp -m state --state NEW -m multiport --dports 80,443 -j ACCEPT
- Then run this command:
sudo /sbin/iptables-restore < /etc/iptables/rules.v4
Now you can access 80 and 443 from outside. (If you alredy open them in "Security List" in OCI dashboard)