Oracle

Add and set up an IPv6 address on your Oracle Ubuntu server

published on

In my experience, when creating servers in Oracle's control panel they tend to come with IPv4 only. It is possible to add an IPv6 address later but it isn't as simple as selecting a checkbox.

Step 1

Once you have logged in to the Oracle control panel open the menu at the left-hand side and choose Compute then choose Instances. Click on the name of the instance you wish to add IPv6 to.

Find the Instance details section and click on the Virtual Cloud Network name. Select the IP administration tab and click on Add CIDR Block/IPv6 Prefix. Under the IPv6 Prefixes section turn on Assign an Oracle allocated IPv6 /56 prefix.

Finally, click on Add CIDR Blocks/Prefixes.

Step 2

Select the Subnets tab and click on the subnet name. Select the IP administration tab and, under IPv6 Prefixes, click on Add IPv6 Prefix. Now select Assign an Oracle allocated IPv6 /64 prefix. Then select the Oracle Allocated IPv6 address field and add the final two characters as requested. Finally, click on Add IPv6 Prefix.

At the top of the page you will see the subnet name and above this a small arrow pointing left followed by the Virtual Cloud Network name. Click on this link which will take you back to the Virtual Cloud Network page.

Select the Routing tab then click on the route table and select the Route Rules tab. Now click on Add Route Rules.

Change Protocol Version to IPv6. Change Target Type to Internet Gateway. Enter ::/0 in the Destination CIDR Block and, finally, select the internet gateway in the Target Internet Gateway dropdown. Now click on Add Route Rules.

 

Step 3

For this next part select the menu on the left-hand side again, choose Compute then Instances. Then click on the name of the instance you are adding an IPv6 address to.

Select the Networking tab, click on the VNIC name and select the IP administration tab. Now click on Assign IPv6 Address. Finally, click on the Prefix dropdown and select your prefix then click on Assign.

Step 4

As the title suggests this guide presumes you are using Ubuntu on your server. If so you can enter the following command which will restart the networking daemon and your new IPv6 address will become available:

sudo systemctl restart systemd-networkd

Step 5

Back on the Oracle control panel open the menu, choose Compute and then choose Instances again. Click on the name of the instance you have added an IPv6 address to.

Now click on the Virtual cloud network name then select the Security tab. Click on the security list name and then select the Security Rules tab.

Click on Add Ingress Rules and set up a rule as below:

Stateless: disabled
Source Type: CIDR
Source CIDR: ::/0
IP Protocol: TCP 
Source Port Range: (leave blank)
Destination Port Range 80,443
Description: Allow HTTP1.1/2 traffic on ports 80 and 443

Now click on + Another Ingress Rule and set up the rule as below:

Stateless: disabled
Source Type: CIDR
Source CIDR: ::/0
IP Protocol: UDP
Source Port Range: (leave blank)
Destination Port Range 443
Description: Allow HTTP3 traffic on port 443

Now click on + Another Ingress Rule and set up the rule as below:

Stateless: disabled
Source Type: CIDR
Source CIDR: ::/0
IP Protocol: IPv6-ICMP
Type: 128
Code: (leave blank)
Description: Allow ping

Click on Add Ingress Rules. Once these rules have been added click on Add Egress Rulesand set up a rule as below:

Stateless: disabled
Destination Type: CIDR
Destination CIDR: ::/0
IP Protocol: All Protocols
Description: Allow traffic

Finally, click on Add Egress Rules.

Conclusion

You should now have a working IPv6 on your server which can send and receive traffic.