How to Open Port on Oracle Cloud Ubuntu Server

Oracle Cloud Ubuntu virtual machines are not compatible with UFW firewall. This is because oracle cloud needs some iptables rules to communicate with storage devices.

To open a port in Oracle cloud Ubuntu Virtual Machine, edit file

Find the line

This is the rule for opening port 22 (SSH). To open another port, duplicate this line, replace 22 with the port you need to open.

For example, to open ports 80 and 443, add these 2 lines below.

IMPORTANT: Do not remove the entry for port 22. If you remove this line, you won’t be able to SSH into the server.

To activate the firewall rules, run the command

To see the INPUT rules, run the command

Back to Oracle Cloud

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *