Add IP to Host Access Control using SSH

petru

Active Member
Jul 12, 2013
38
1
8
cPanel Access Level
Root Administrator
Hey Guys,

The inevatible has happened.
I locked down our server a few months back after a pretty bad security breach.
I added 3 different IP addresses to the Host Access Control to make sure we can always have access if someones IP changes.

Unfortunatly We just had a new Modem installed and had our lines restarted today and our IP address got changed.
and of course the other 2 ip addresses that we had in the Host access control have also happened to change although they were static IP's. So our Host is taking forever to get back to us. We need to gain access to the server,
And I just remembered that we have VMware access to the server. I've juct logged in via Consol to the Server as Root but I'm unsure as to what i need to enter to add the new IP to the whitelist. or what i can do to pause the HAC service.

Can someone give me a hand?

Regards,
Petru
 

petru

Active Member
Jul 12, 2013
38
1
8
cPanel Access Level
Root Administrator
Solution to the Problem: Vi in to /etc/hosts.allow
and edit the file with your new IP Address. Then save it and you can login.
Google Vi commands to find out how to use Vi editor.
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello :)

Yes, the rules configured in the "Host Access Control" option of WHM are stored in the /etc/hosts.allow file. I am happy to see you were able to resolve the issue.

Thank you.