Page 1 of 1

Need Help Lost Access to Server

Posted: 2019/10/12 02:39:48
by Garoye
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

Re: Need Help Lost Access to Server

Posted: 2019/10/12 12:46:15
by TrevorH
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.