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: Unable to Access TCP Port in Ubuntu Instance

edited Aug 9, 2022 4:48PM in Linux

Applies to: 

Oracle Cloud Infrastructure

Linux x86_64

SYMPTOMS

  • An application is configured to listen for connections on a TCP port (e.g. 10000) in the instance.
  • There are active ingress rules in the instance VCN to allow incoming traffic to port 10000/TCP in the OCI Cloud Console.
  • This is a standard Ubuntu 18.04 LTS instance with the ufw disabled and stopped
  • The application is active and listening on all IP addresses (0.0.0.0/0) for the port 10000 in the Ubuntu instance.

CAUSE

iptables rules are in place and not allowing incoming connections to the 10000/TCP application port

Solution

Check the existing iptables rules:

# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- anywhere anywhere udp spt:ntp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
InstanceServices all -- anywhere link-local/16 .......

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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