Troubleshooting EC2 server outbound connection issues using cURL timing out

Hi,

My EC2 server has been working fine for some months, but the past week it’s not letting any outbound connections. Mainly having issues with cURL, with it timing out / getting host unreachable. Thought it might be an ipV6 issue that EC2 ipV4 only instances can have and disabled ipV6 using grub, but no luck. Ports are all open, and security group is all open for outbound.

It’s reachable fine inbound, the sites hosted work fine (besides anything requiring cURL). apt update/upgrade doesn’t even work

Anyone have any ideas on what the issue could be? Really don’t want to have to go through the hassle of setting up a new instance.

If you have inbound access from the public web it could be pwned

Mostly likely some configuration changed though

Does it have some public IP or route to the Internet?

Running it as a web server with a cloudpanel

With a public IP on the ec2?

The only inbound ports open are 3306, 80 and 443

First thing to look at is things you changed right before it stopped working

Unfortunately there’s not enough information here to really suggest the root cause

You have a pet and it’s sick :white_frowning_face:

I didn’t change anything tbh. Last week my server crashed, so I rebooted it as usual and went about my day, but turns out after that reboot is when it stopped working

You could roll back to a backup from before it crashed maybe

But that makes me think even more it was compromised

There are a lot of security concerns with your setup

To be honest that’s what I’m thinking. I’ve already wasted a lot of time trying to fix it and rolling a backup might just be simpler

I’m interested that you say that, I thought locking access down to allowed IPs was secure enough xD

Hmmm you have restrictions for all the inbound rules?

That’s not as bad in that case