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 : gives us as David Bowie scolding 's Technical Boy, & we're so happy:… https://t.co/qgco4Pmuw2 14 hours 20 min ago
  • My 9 year old is creating a MEPtionary, which basically consists of replacing random MEPter seMEPces with MEP. Says he'll be a MEPionnaire. 14 hours 22 min ago
  • I laughed. I guffawed. I smirked. I giggled like a little kid. https://t.co/og9hAwtt0A 16 hours 7 min ago
  • Curse me for a fool! I overcooked the egg yolk for my Hollandaise sauce and wound up with liquid butter mixed with scrambled eggs. 1 day 12 hours ago
  • RT : RT - Today, Jesus & Mo ponder the origin of hatred: https://t.co/7OmhlE71GI 1 day 13 hours ago