You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

OCI – How To Open Network Ports in Ubuntu

edited Feb 18, 2025 11:01AM in Linux 1 comment

Applies to:

Oracle Cloud Infrastructure

Linux x86-64


Goal:

In OCI Ubuntu instances (image Ubuntu-22.04) opening anetwork port in UFW don’t work.


Solution:

Note: Ubuntu images based on 24.04 no longer are provisioned with UFW

Ubuntu 22.04 uses nftableas abackend for UFW.

OCI Ubuntu images are provided witha set of iftables, necessary to guarantee OCI functionality.

If an access to a new network port needs to be opened, it must be opened in UFW but also in iptables. 

For example, to open RDP port on a Linux instance, run:

1) UFW:

$ ufw allow 3389/tcp

2) To open the port in iptables:

$ iptables -I INPUT 6 -p tcp -m state --state NEW -m tcp --dport 3389 -j ACCEPT

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!