Tuesday, December 11, 2018

How to Open a Port and access application via web browser on OCI Console


By: Vikas Raina 

Introduction


This document describes the steps one needs to perform in order to open a port and then access the application deployed on the VM using web browser.

Pre-Requisite


1.       VM instance should have been created and running

2.       Access to Public and Private keys used during creation of VM instance

3.       Access to OCI Console




              Note down the Public IP of the VM

2.      Log into the VM using SSH and run the following command


                $ sudo iptables --list --line-numbers







It is required to Delete REJECT all rule in the IPTABLES



Run the following command on the VM prompt:



$ sudo iptables -D INPUT <Reject Line number>

e.g.

$ sudo iptables -D INPUT 6




$ sudo iptables --list --line-numbers







Access the Default Security List and Edit Ingress Rules to Allow Internet Traffic on Port <port number>

Edit the INGRES Rule Add CIDR 0.0.0.0/0 TCP Destination 9999






4.      Deploy your application on the VM


Ø  Run curl command and see if the application is accessible via opened port

5.      Access your application via web browser


         Type http://<public IP address of the VM>:port






No comments:

Post a Comment