Back to Top

Locked Out!

And so, I got locked out of my own cPanel server. I could not SSH, view a Website, or open the WHM console -- I was stuck. It was stupid really. I tried to set up an icon in my file manager so I could access a customer's FTP account. Except I tried to set it up as an SCP account (I don't do FTP much). Well, after trying a few times and failing, my server did was I told it do; it locked me out.

Panic set in until I remembered that I'm the system's administrator and I know stuff. I logged in to another of my servers, connected using SSH, then looked for the deny entry in iptables. Like this:

iptables -L DENYOUT -n --line-numbers | grep 192.168.22.44

Obviously, the IP address up there isn't really my IP address; it's there for demonstration purposes. My WHM server has the traditional INPUT, OUTPUT, and FORWARD ip tables, but there's also a chain for the bad guys whom the system traps. That's DENYOUT.

The command returned the following.

94   DROP       all  --  0.0.0.0/0            192.168.22.44

That tells me the line number in that chain where my IP is blocked is 94. The next step is to delete that entry.

iptables -D DENYOUT 94

Just like that, all was right with the world.

ABOUT THE AUTHOR

Comments

The Original Cooking with Linux
 
Appearing monthly, 3rd Thursday, on Computer America
Appearing every 3rd Thurday of every month on the Computer America radio show.
  • RT : Brilliant response from to KPFA's ridiculous cancellation of his lecture Aug 9. https://t.co/igBZpaLVd9 12 hours 53 min ago
  • It's July 23, and I am at Chapters. Thus is their holiday display. Too soon? https://t.co/qk1m9NnNsf 17 hours 32 sec ago
  • On the upside, the Internet has a potentially perfect memory. On the downside, the Internet has a potentially perfect memory. 2 days 16 hours ago
  • So, what you're saying, if I read this correctly, is that the GNOME Tweak Tool's name has been tweaked. 2 days 20 hours ago
  • Just finished 's Revisionist History, King of Tears. If you aren't crying by the end, I can't help you. https://t.co/Qfc4fC6MYo 2 days 21 hours ago