OCI: Setting up the firewall on iaas VMs

Examples of command to manage the firewall on OCI VMs.

OL6

sudo iptables -I INPUT -p tcp -m tcp --dport 3876 -j ACCEPT 
sudo iptables -I INPUT -p tcp -m tcp --dport 8000 -j ACCEPT
sudo service iptables save
sudo service iptables restart

OL7

https://docs.oracle.com/cd/E52668_01/E54669/html/ol7-ctrlfwsvc-sec.html

sudo firewall-cmd --zone=public --add-port=8000/tcp --permanent
sudo firewall-cmd --zone=public --add-port=8443/tcp --permanent
sudo firewall-cmd --add-port=5555/tcp
sudo firewall-cmd --add-port=1521/tcp --permanent
sudo firewall-cmd --add-port=1950/tcp --permanent
sudo systemctl restart firewalld.service