Cant connect to my gmod dedicated server!

Hello I am trying to set up my gmod 13 server and I have managed to get it to start up with no errors. However, when I try to connect to it, it says that its not up. I am running centos on my server and have added the ports 27015 udp, 27015 tcp, and 27020 udp. Please help!

If you’re connecting from the same network, connect using the local ip (should be 192.168.X.X where X is some number), otherwise use the external IP address. Are you connecting from the console?

I have tried both connecting via legacy browser and via console. The server is not on my local network, its a dedicated server on the cloud.

Have you checked to see if your server is allowed through the Windows Firewall? I had a similar problem with my server not showing up via Internet tab. Fixed it by allowing it through Firewall.

My server is running Centos 6 which is a version of linux.

Is there another port that I have to add to my iptables or something?