Need Help Lost Access to Server

Support for security such as Firewalls and securing linux
Post Reply
Garoye
Posts: 1
Joined: 2019/10/12 02:24:24

Need Help Lost Access to Server

Post by Garoye » 2019/10/12 02:39:48

I have a CentOS server running Cpanel which I lost access to but cannot figure out how to get back in. Long story short I was getting support to install backup software on the server. The support guy ran iptables -F and poof lost access to ssh, cpanel, the works. The person who setup the server is MIA so can't get any info from them.

I tried restarting server no luck.
When I run iptables -L i get a list of the chain but 0 references.

I tried iptables -A INPUT -p tcp --dport ssh -j ACCEPT to see if I can get into SSH but no success.

I also checked if firewalld was running but its not.

I could really use some help figuring out what is going on. Thanks

User avatar
TrevorH
Forum Moderator
Posts: 27127
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Need Help Lost Access to Server

Post by TrevorH » 2019/10/12 12:46:15

If all they ran was iptables -F then a reboot should have cleared the rules and restored them from /etc/sysconfig/iptables. Though since this is cpanel and they often replace iptables with CSF, that's not something that can be relied upon. It's also the reason (one of them) why we do not support cpanel systems here.

We are not able to support either cpanel or the boxes that it is installed upon here due to the many changes that this application makes to the base OS. Please ask in #cpanel on Freenode IRC (/join #cpanel) or see https://documentation.cpanel.net/displa ... ort+Ticket to open a ticket.

You might try inserting your new rule at the top of the chain rather than appending it to the end. Rules are processed in order from top to bottom so if there is a rule in there now that is stopping you from accessing it then appending a rule will make no difference as it will never be reached.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Security Support”