For security reasons, SSH access to your server is blocked at the firewall level. Before you can connect to your account via SSH, you will need to add your local IP address to the firewall.

  1. Find your IP address. Visit the following url:

    http://www.inmotionhosting.com/support/ipcheck.php

    Note the IP address that is displayed. This is your IP address as seen by the rest of the internet.

  2. Log into your WHM. (Web Host Manager)
  3. Click the "Add IP to Firewall" link in the left menu.

    Note! This link is one of the last links in the left menu in WHM. You can also type in the search box at the top right "Add IP" and the link will show on the left.

  4. Enter your IP address in the "Allow Rule:" field and click the "Add Rule / Restart" button.

    Note! You cannot view IP addresses in your firewall through the WHM. To view your IP addresses, you will need to look in the following file through shell.
    /etc/apf/allow_hosts.rules

Please Note:
If your IP address does not stay the same each time you connect to the internet, you can add a range of IP address so that you do not need to add your new IP address each time it changes. We are unable to advise you with what your IP range is, however your Internet Service Provider should be able to assist you further. You will need to use CIDR formatting when adding a range of IP addresses. Please see the "Information on CIDR Formats" and "IP to CIDR Converter" links in the "Add IP to Firewall" page in WHM for further assistance.

Learn more about SSH Hosting.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2014-03-09 5:18 am

While following this guide, we wanted to know how to remove IPs that had already been added using the process above.

The WHM documentation refers to a plugin, "ConfigServer & Firewall", which was not installed by default in our managed VPS's WHM.  According to IMH tech support, you can opt to install this WHM plugin yourself, or request that they do so (fees may apply).

While looking into SSH options, we checked to see if we could edit entries in the "/etc/ips" file, as is described in:

http://linuxadministrator.pro/blog/?p=400

But that file was empty.  We also didn't have access to the iptables command in our shell.  So... how could we manage these added entries via SSH?

Tech support pointed us towards the "/etc/apf" file which contains a list of the IPs added via WHM's "Add IP Address to Firewall".  The ones we had added via WHM appeared at the end of the file, and we edited it accordingly.Be mindful that there other IP entries in there which should be left as is (eg: the InMotion Hosting section).

n/a Points
2014-03-09 6:10 am

I recently left a comment about removing an IP address after adding it.To restart the firewall after making edits to "/etc/apf" I used the command:

service apf restart

as is listed in your "How To Open A Port in Your Firewall" doc.

n/a Points
2014-09-16 3:15 am
um this is wrong. i get this error:
Failed to generate error template while processing error message: WHM is configured to disallow execution of unregistered applications when logged in as a reseller. To enable this functionality you must do one of the following: Register this addon using /usr/local/cpanel/bin/register_appconfig (http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/AppConfig), Enable the "Allow apps that have not registered with AppConfig to be run when logged in as a reseller in WHM" option in "Tweak Settings", or add permit_unregistered_apps_as_reseller=1 to /var/cpanel/cpanel.config, and run /usr/local/cpanel/etc/init/startcpsrvd
Staff
10,022 Points
2014-09-19 11:31 am
The instructions are correct, however, on your particular server a setting needed to be adjusted. I have corrected it and you should now be able to follow these instructions.
n/a Points
2014-09-19 10:45 am

Our office IP is dynamic. Can we use something like hostname.dyndns.org address?

Staff
10,022 Points
2014-09-19 11:36 am
Unfortunately, this would not be possible and your IP would need to be used.
n/a Points
2014-09-23 7:10 am
The WHM does not list a Add IP button
n/a Points
2014-09-26 12:09 pm

The "Add IP to Firewall" link is not present in the left-hand menu. I used to have it in the previous version of WHM, but since it was updated, I cannot find it.Would appreciate any help.

Staff
18,513 Points
2014-09-26 12:36 pm
Hello OG Solutions,

The Add IP to Firewall solution should still be there, but will only be available if you're logged in as a root admin. If you're logged correctly and you still don't see it, please submit a support ticket or contact live technical support for immediate assistance. If there is an issue with that feature, then it may require that senior systems personnel be involved in its resolution.

If you wish for the issue to be investigated through the support center, we would need more information regarding your account.

Kindest regards,
Arnel C.
n/a Points
2014-12-03 3:04 pm

The instruction to remove ip address from firewall is not working.

I am not allowed to view /etc/apf/allow_hosts.rules from shell .

Staff
18,513 Points
2014-12-03 4:38 pm
Hello Asok,

Thanks for the question and sorry for the problems with editing rule. The firewall rules can only be edited if you have root access to the server. If you are on a shared server account or VPS/Dedicated server account without root access, please contact our live support team via email/phone/chat. Make sure that you include the verification for your account (AMP password or last 4 digits of your credit card on the account). Describe your request and they will be able to finish it for you.

I hope this helps to answer your question, please let us know if you require any further assistance.

Regards,
Arnel C.

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

12 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!