Thursday, July 29, 2010

Restrict Server FTP

Server default firewalls are often hackable.
To be able to protect your server is to set some restrictions.
Restricting yung FTP would be one of those...

First of all you need a telnet/ssh client.
Open source telnet and SSH Client for Windows and Unix platforms is available in the internet...

In this simple tutorial I'll be using puTTY.
And here's how you do it....

1. Open PuTTY.exe
2. Type in the server's ip in the Host Name field.
3. Input 49182 in the Port field.
4. Click Open button

A black screen window will popup asking for login details...
You should have login details, otherwise ask for the server admin.

5. Input login details.

After successful login you should see [yourusername@server~]$ in the command prompt

6. type in su -
7. Enter administrator's password
8. Go to etc/csf folder, to do this type in cd /etc/csf
9. Backup csf.conf file, type in cp csf.conf csf.backup1.conf
10. Open csf.conf in editor, type in nano csf.conf
11. Search for TCP_IN and TCP_OUT by pressing CTRL+V (Next Page).
12. Delete 21 in the line TCP_IN = "21,25,53,80,443" (this are sample ports).
13. Delete 21 in the line TCP_OUT = "21,25,53,80,443" (this are sample ports).
14. Press CTRL+X and then press y to save the changes made.
15. And lastly, restart the csf by typing the command csf -r

Done! :)