When Oracle Cloud's Ubuntu instance doesn't accept connections to ports other than 22
Thanks to the free trial periods, I’m testing this and that on Oracle Clouds.
While running a Ubuntu instance, I was stuck with a weird problem that made me pull out hairs for hours.
My problem was this:
I added several ingress rules in my default security list,
but the instance didn’t accept any connection to ports other than 22, the SSH port.
I looked into nearly every network setting in the Oracle Cloud console and searched for similar problems on the web,
but nothing worked.
After some time and more tests, I began to suspect that a firewall or something was blocking connections.
When SSH server on port 22 was down, it said connection was refused.
But when I tried connecting to other ports, it said no route to host.
Hmmmm… interesting, something was blocking connections.
I searched for any configuration for
There were two files in
/etc/iptables/, and gotcha!
I found rules that were rejecting connections in
Because of these things, changes in the console would never have effects.
Amazon AWS’s Ubuntu images don’t have such configurations by default, so it maybe due to Oracle’s security policy.
I didn’t want to take Oracle’s default security policy down, so I just added following lines:
By both adding ingress rules on the console and inserting lines in
I could finally connect through other ports without any problem!
Oracle is a relatively new runner in the cloud race.
It needs some more work on it, but I think the new
Always Free service is a really attractive starter for developers like me.