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.
  • I have a confession to make. I absolutely love sautéing. A pan, butter, some veggies, onions, garlic, lots of butter ... Yummy! 11 hours 31 min ago
  • You can imagine someone saying, "When I said I had a death wish, I didn't actually mean that I had a death wish." https://t.co/e0K8KkYn6l 1 day 14 hours ago
  • RT : Cannabinoids (the chemicals responsible for the 'high' in weed) are present in breast milk to help calm the baby and make it more hungry. 1 day 15 hours ago
  • RT : : All 50 Medicaid directors come out against GOP bill to repeal ObamaCare https://t.co/M3gG5xQtMz https://t.co/1F7eCd9qB4 1 day 16 hours ago
  • RT : 84% of vegetarians and vegans switch back to eating meat at some point. 1 day 16 hours ago