Skip to Main Content

Core Infrastructure

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to attach Public IP address to VNIC in Oracle Cloud instance running Ubuntu 20.04 server

dan-ranFeb 1 2023

I am running Ubuntu Server 20.04 on an oracle cloud instance. In Ubuntu, When I type

ip a 

it returns the following (showing only my private Oracle IP attached to the VNIC):

   2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast state UP group default    	qlen 1000
       link/ether 0X:0X:1X:1X:1X:9X brd ff:ff:ff:ff:ff:ff
       altname enp0s3
       inet 10.0.0.119/24 brd 10.0.0.255 scope global ens3
          valid_lft forever preferred_lft forever

The problem here, is that Oracle seems to assign the Oracle Private IP to the VNIC, and then NAT my Public Oracle IP address to the VNIC. The problem with this, is that I am using my Oracle Instance as a VPN Server, and need to enable port forwarding on it via `/etc/ufw/before.rules`. When adding the servers public IP address to the port forwarding rules, and forwarding the IP to the VPN Client, the client cannot traverse this built in Oracle NAT, and therefore, port forwarding doesn't work on the VPN Client.

Could someone please explain in detail (and possibly with screen shots), how exactly I can configure my oracle cloud instance settings to attach my public IP address directly to my VNIC on my Oracle Instance, so that port forwarding can work with my vpn server?

Thanks for any help or directions!

Comments
Post Details
Added on Feb 1 2023
3 comments
1,799 views