SSH, Security List & Firewall
Harry
· 14 Sep 2026
· 1 views
Advertisement
Two firewalls gate your app
OCI VMs sit behind a Security List (in the VCN) and the OS firewall. You must open a port in both or nothing is reachable from the internet.
1) Open the port in the Security List
Console → Networking → Virtual Cloud Networks → your VCN → Security Lists → Default Security List → Add Ingress Rules. For a Spring app on 8080:
Source CIDR : 0.0.0.0/0
IP Protocol : TCP
Destination Port Range : 80802) Open the port in the OS firewall
# Oracle Linux uses firewalld:
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
# Ubuntu 24.04 may use ufw:
sudo ufw allow 8080/tcp && sudo ufw enableVerify SSH hardening
sudo sed -i "s/^#?PasswordAuthentication.*/PasswordAuthentication no/" /etc/ssh/sshd_config
sudo systemctl restart ssh
# confirm 22 still answers before closing any sessions!With PasswordAuthentication no and key-only login, the box is already safer than most default VPS setups — and you never fear a single failed key exchange again.