ElasticSearch IPv6

I installed Elasticsearch 9.2.0 on Ubuntu VN hosted on Oracle OCI cloud. But I cannot connect outside. After listening the listening ports on the VM I see this:

sudo netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 692/sshd: /usr/sbin
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 601/systemd-resolve
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/init
tcp6 0 0 :::22 :::* LISTEN 692/sshd: /usr/sbin
tcp6 0 0 :::111 :::* LISTEN 1/init
tcp6 0 0 10.0.0.12:9300 :::* LISTEN 1040/java
tcp6 0 0 :::9200 :::* LISTEN 1040/java

As you can see Elasticsearch by default is not listening on IPv4 port. I disabled on the VM IPv6 but still it’s not working. Can you recommend some solution?

Somewhat confusingly tcp6 refers to the mixed IPv4 and IPv6 stack, as you can see from this line which has an IPv4 address:

tcp6 0 0 10.0.0.12:9300 :::* LISTEN 1040/java

This line means it’s listening on all interfaces:

tcp6 0 0 :::9200 :::* LISTEN 1040/java

Please read these docs carefully for further information, noting in particular:

It is usually a mistake to use 0.0.0.0 as a publish address on hosts with more than one network interface.