Limit SSH access By IP Address
Secure your server more, and prevent brute force attacks, you can limit SSHd to certain IP addresses by manipulating the /etc/hosts.allow file and the /etc/hosts.deny file.
Open /etc/hosts.allow
Use the following command to open the hosts.allow file:
Once this file is open, add the following line:
Open /etc/hosts.deny
Use the following command to open the hosts.deny file:
Once it opens, add the following line to the file:
Save and exit, and you have successfully limited SSH access by IP address.
How To Unblock IP address from command line in CSF Firewall
In order Unblock IP address from CSF Firewall at command line you need to execute below mentioned commands.
Login into the server via shell access and go to the path of CSF firewall.
Edit the file csf.deny.
Remove the IP address from the list and save the file.
Once the IP address removed we need to restart the Firewall.
To Restart Firewall one need to execute below mentioned command.
How to block a specific IP Address from accessing your Website
If you have annoying visitors, site scrapers, or spammers, you may find it useful to block these users from accessing your website content. You can block bad visitors by IP Address (or blocks of IP Addresses) using a .htaccess file. Below are some useful examples.
In the following example, all IP Addresses and domains are accepted, except for xxx.xxx.xxx.xxx and bad-site-example
.com.
# allow all except those indicated here
<Files *>
order allow,deny
allow from all
deny from xxx.xxx.xxx.xxx
deny from .*bad-site-example\.com.*
</Files>
In the following example, all IP addresses are denied access except for xxx.xxx.xxx.xxx and good-site-example
.com.
# Deny access to everyone, except those listed here:
<Files *>
order deny,allow
deny from all
allow from xxx.xxx.xxx.xxx
allow from .*good-site-example\.com.*
</Files>
Finding your current IP Address
There are several free websites that offer you the ability to find your current IP Address. The following is a short list of websites that will provide you this information:
http://whatismyIP.com
http://IPChicken.com
http://tracemyip.org
Every device connected to the public Internet is assigned a unique number known as an Internet Protocol (IP) address. IP addresses consist of four numbers separated by periods, e.g. 127.0.0.1. Knowing the current IP Address of your home computer can be helpful when troubleshooting an issue.
HOWTO: Set default site for IP address in Plesk Control Panel
You can select and change which of your Domains your IP address points to by making a simple change in your Plesk Control Panel. This is also useful if you want to preview a site before changing your DNS settings.
1. First, log in to your Plesk control panel,
2. Click on Server.
3. Click the icon for IP Addresses, and you will see a number X under the heading hosting on the far right which indicates how many domains you have on each corresponding IP address.
4. Click on the number you see for the IP address in question.
5. On the next page, you’ll see radio buttons next to each of your domains. Select the radio button for the Domain that you want to see when browsing to your IP address, and then click Set as Default.
Now, when you browse to your IP address, you’ll see the domain that you have selected as Default.