Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle instance without public ip cannot connect connect to internet

I have one instance with a public ip. That works fine. I spun up another instance without a public ip in the same network.

Now, this second instance without a public ip is only accessible from the first VM using its private ip. This is OK. My problem is, the second instance is not able to connect to internet at all (outgoing connections to internet from this instance is failing).

The second instance is able to connect to port 22 of the first instance though. Without direct outbound access to internet, it is very difficult to install anything on this second instance. I dont see any obvious firewall rules that blocks this.

What am I missing ?

ubuntu@instance-20190928-0654:~$ ping www.yahoo.com
PING atsv2-fp-shed.wg1.b.yahoo.com (87.248.98.8) 56(84) bytes of data.
^C
--- atsv2-fp-shed.wg1.b.yahoo.com ping statistics ---
14 packets transmitted, 0 received, 100% packet loss, time 13307ms

like image 323
Sangitha Avatar asked Jan 31 '26 03:01

Sangitha


1 Answers

You have multiple options:

  1. Add a public IP to the private instance - this is the simplest method but is likely not what you want to do.

  2. Tunnel the outbound requests through an on-premise network. See https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingIPsec.htm

  3. Set up a NAT Gateway. See https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/NATgateway.htm

  4. Setup a NAT instance. See https://blogs.oracle.com/cloud-infrastructure/automate-deployment-nat-instance-in-oracle-cloud-infrastructure-with-terraform

  5. Setup a secondary VNIC. See https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm

like image 56
Ling Toh Avatar answered Feb 03 '26 01:02

Ling Toh