I set it to a port other than the default port used by SSH, MariaDB, PostgreSQL and MongoDB. To connect these daemons, firewall(NOT ufw BUT iptables) must be configured in OCI(ubuntu 22). Besides these ports should be added to public subnet’s security list in OCI. Followings is only about firewall.
sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT 2 -p tcp --dport 443 -j ACCEPT
sudo netfilter-persistent save
sudo netfilter-persistent reload