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

Announcement
1298
Views
0
Comments

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:

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!