If you are using oracle’s compute instance, you may have faced a problem where all the ports are blocked. The firewall is not active so why does it not allow any incoming packets. The reason is that oracle uses iptables for defining which ports should be active. In order to activate all ports, use the following line of code.
$ iptables -P INPUT ACCEPT
$ iptables -P OUTPUT ACCEPT
$ iptables -P FORWARD ACCEPT
$ iptables -F
This will allow you to open the ports. But it is not permanent. Every time oracle compute restarts, it runs a service that blocks all ports again. In order to save tables permanently, run the following line of command.
iptables-save > /etc/iptables/rules.v4