Cpanel Autofixers

Hello Friends,
The cPanel comes with a number of hidden autofixer commands that allow for administrators to fix common problems simply be logging into WHM and going to a special URL. Two of the most useful ones I’ve seen are flushing iptables and restarting SSH in safe mode. The generalized URL to execute an Autofixer command is given below:
~~~~
https://your_server_IP:2087/scripts2/doautofixer?autofix=autofix_command
http://your_server_IP:2086/scripts2/doautofixer?autofix=autofix_command
~~~~

You need to replace the word autofix_command in the URL with Autofixer command names given below.
~~~~
bsdbindfix — Resolve port issue with BIND 9.
compresszlibfix — Fix for compress zlib error.
dbdmysql — DBD::mysql fix for older version of Red Hat (i.e. 7.3).
fpindexfile — Fix for FrontPage index.
iptablesflush — Flush iptables rules from WHM if you are firewalled from SSH.
libxml64fix — Fix for libXML on 64-bit systems.
resellerresourceacctounts — Fix for reseller resource accounts.
safesshrestart — Restores SSH Config and restarts SSH.
vfilterfix — Restores /etc/vfilters files.
yumduprpmfix — This will attempt to locate and resolve any duplicate RPMs.
~~~~

Let us see some detailed Description of two commonly used AutoFixers here.
~~~~
Most common issues we encounter during Server access is SSH port number not known or iptable service failure. In both cases you cannot get into the server. What can we do in such cases? We can login to the WHM using the Autofixer URLs given below to gain access.

=========================
Autofixer : iptablesflush
Use : Flush iptables rules from WHM if you are firewalled from SSH.
URL :
https://your_server_IP:2087/scripts2/doautofixer?autofix=iptablesflush
http://your_server_IP:2086/scripts2/doautofixer?autofix=iptablesflush
=========================

=========================
Autofixer : safesshrestart
Use :  Restores SSH Config and restarts SSH.
URL :
https://your_server_IP:2087/scripts2/doautofixer?autofix=safesshrestart
http://your_server_IP:2086/scripts2/doautofixer?autofix=safesshrestart

Logging in to the WHM with the above URL will reset the SSH port to Port 22.  Now you can use the Port 22 to login to server via SSH.

PS* :  Once you gain access to SSH, you need to open /etc/ssh/sshd_config to find out the current SSH port and restart the SSH service to reset the SSH port to the current. Now you will no longer be able to use SSH Port 22. Since you have seen the SSH port from the config file, you can use the same to gain SSH access.
=========================

In fact, I heard of another way to find out the SSH port if you don’t know what is the SSH port number. If you have WHM access, you can login to the server and Home >> Restart Services >> SSH Server (OpenSSH)

While restarting SSH service you will displayed with some details on the screen where you will be able to see the SSH port. You can use the SSH port to login now. I have not noticed it yet. You can give it a try as well. Or you can simply use the Autofixer script to do the trick.

Thank you for reading friends!!! Have a great day!!!!! 🙂 😉

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s