For security reasons, SSH access to your VPS 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. This guide will show you how to add your IP Address to the Firewall for SSH access.
Adding your IP address to the Firewall
- Find your IP address. Visit the following url:
The IP address that is displayed is your IP address as seen by the rest of the internet.
- Log into your WHM.
- Click the “Add IP to Firewall” link in the left menu. 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.
- 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 using shell.
/etc/apf/allow_hosts.rulesPlease Note: If your IP address does not stay the same each time you connect to the internet, you can add a range of IP addresses 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.
Congratulations, now you know how to add your IP Address to the Firewall for SSH access. Check out our section on SSH and root access to learn more.