Last active
December 23, 2021 18:56
-
-
Save zulhfreelancer/92dfed8d62d2630fdb91ed40ecf3058e to your computer and use it in GitHub Desktop.
How to open a port in Oracle Cloud Instance?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
# IMPORTANT | |
# Make sure you already create an ingress rule for the port that you want to open in Oracle Cloud virtual firewall aka | |
# "Security Lists". This tutorial might be useful for you: | |
# ---> https://youtu.be/1AIXULHjabQ | |
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
# SSH into the instance | |
$ ssh <username>@<ip_address> | |
# Install | |
$ sudo apt-get install -y firewalld | |
# Open the port (e.g. port 80) | |
$ sudo firewall-cmd --zone=public --permanent --add-port=80/tcp | |
# Reload | |
$ sudo firewall-cmd --reload | |
# Verify using another machine (e.g. local/dev machine) | |
$ nc -zv <ip_address> 80 | |
Connection to <ip_address> port 80 [tcp/http] succeeded! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment