32. NW ‐ configure Bidirectional traffic connectivity between instance in public network and instance in private network - Ayushi-srivastav/OCI GitHub Wiki

Steps to Configure Bidirectional Connectivity Between Public and Private Networks

Bidrectional traffic connectivity

In this setup, we aim to establish bidirectional traffic connectivity between a Jumpserver (located in the public subnet) and an **Application server ** (located in the private subnet) within the same VCN.

Step 1 : Check connectivity

In this scenario, Test_Instance serves as the jumpserver, while Test_custom_Instance functions as the application server.

image

First, we login to jumpserver (Test_Instance) via key/password

image

Next, we will add an ingress rule for the TCP protocol on port 22 and the ICMP protocol in the VCN (Test_VCN) to establish connectivity.

image

image

Now, attempt to ping the application server from the jumpserver using the command ping

As we can see in below secreen, connection is establised

image

Next, we will try Telnet command again we can check connection is established to an application server

image

Step 2 : Generating keys

Now create a directory named Keys

mkdir keys
ls -lrth

image

go to the Keys dirctory

cd keys

image

now create a file named privatekey in pem format (here Privkey.pem)

vi privkey.pem

image

paste the private key in pem format then save and exit

image

image

next change the access permissions of privkey.pem file

chmod 600 privkey.pem

image

Now, attempt to access the private application server by executing the following command.

ssh -i /root/keys/privkey.pem [email protected]

As we can see, we have successfully configured and established connectivity between the public and private servers.

image