Securing FTP Access On VPS & Reseller Hosting Accounts

Most of the days several reseller web hosting and vps hosting accounts are begin affected by unauthorised FTP uploads. not like vps and reseller hosting, on cpanel hosting accounts we tend to are responsive to the domains which are being created and might be altered directly from the systems. However, it’s impossible with the vps and reseller hosting accounts because the clients has the flexibility to add any number of domains.

However, we can offer a method so as to secure FTP access to your web site for number of IP addresses or a complete subnet.

Primarily, you need to determine your own IP address 1st. One amongst the best way to find your ip address is to visit www.whatismyip.com web site. Once you visit this web site it’ll show your ip address like “Your IP Address Is: xxx.xxx.xxx.xxx”. This is often all you would like to determine if you’re on a static IP address. However, if you’re allotted with a dynamic IP address, it suggests that your ip will keep on changing, thus you’ll need to know the ip addresses you’d be allotted.

If you’ve got a static ip address allotted, visit the “Whatismyip” web site and click on on the “IP WHOIS Lookup” link on the left of the page and then click the “Whois Lookup” button. You’ll see a detailed information about your ip address on the center of the page. in this information, you ought to see one thing like this:

inetnum : 128.0.0.1 – 128.0.0.53

The above is the range of the IP addresses you could be assigned.

Now, as you have the possible ip addresses, you can proceed with the steps as follow.

On your system, create a file .ftpaccess in a text editor (make sure you put the (.) dot at the beginning of the file name).

If you have a static ip address assigned and put the following content in that file:

<Limit ALL>
DenyALL
Allow 128.0.0.1
Allow 1.2.3.4
</Limit>

The line “Allow 128.0.0.1” should be left in the file as a backup in order to enable you the access to the .ftpaccess file through the Filemanger in the Admin area.

If you are assigned with a dynamic ip address, then you will have to Allow the possible range of ip address based on the example “inetnum: xxx.xxx.xxx.xxx – xxx.xxx.xxx.xxx”. The file contents will look like this:

<Limit ALL>
DenyALL
Allow 128.0.0.1
Allow 1.2.3.
Allow 1.2.4.
Allow 1.2.5.
Allow 1.2.6.
Allow 1.2.7.
</Limit>

Now, as you’re done with creating the .ftpaccess file, you simply have to upload that file into the httpdocs, httpsdocs and cgi-bin folders on the server. It’ll limit all the ip addresses attempting to access your web site via FTP accept those ip addresses that are Allowed within the .ftpaccess file.

The above change won’t stop blocks on SFTP or WinSCP, if you’re attending to use only these protocols you may create a file with the following contents.

<Limit ALL>
DenyALL
</Limit>

The lines shown above will restrict any FTP access to your web site. This tutorial is applicable just for the Reseller web Hosting and VPS Hosting accounts. If you’re not aware of above, you’ll simply raise a ticket at our support desk and leave the rest on our technical experts.