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.
  • Smart cat, that. https://t.co/pr47hJaIMK 11 hours 25 min ago
  • Sold! [ insert appropriate smiley here ] 15 hours 7 min ago
  • I just got my speakers (one for the kitchen and one mine for the bedroom) an hour and a half ago a… https://t.co/xLt2bwNA57 15 hours 8 min ago
  • hmmm, I would have taken the $5 frown, myself. 16 hours 44 min ago
  • RT : People sometimes compare Trump to Nixon. Here’s the letter Nixon sent Jacqueline Kennedy on this day, 1963. In his… https://t.co/uJeA9WmlOL 1 day 5 hours ago