Month: March 2014

Unblock IP From fail2ban SSH

Okay, Ive done this sometimes where I typed in my password hastily and ended entering it incorrectly mutiple times which results to my IP being ban by fail2ban. To unban your IP you need to either wait for the ban time you set to expire or if you cant you will need to access your server using a different IP address.

Once you have gained access to your server type this in:

iptables -L -n

Search for the line where you IP is. It should be below the line of:

Chain fail2ban-ssh (1 references)

If its there then your IP is still banned from using SSH. To remove it type:

iptables -D fail2ban-SSH -s [your-ip] -j DROP

Change “[your-ip]” to your actual IP. Now check again the iptables and the entry for your IP is should now be gone and this means that you are now unban from fail2ban-ssh.

Setting Up Your First Debian/Ubuntu VPS

After you have created your first VPS, your VPS provider should give you the credentials for logging in through ssh. For Linux users you can just type into the terminal:

 ssh [user]@[your-vps-ip]

For Windows user you can download Putty an application that can be used for ssh. Now connect to your VPS through ssh. I assume you are now using the root user.

Update/Upgrade Server

Make sure that your server is updated. Type in:

apt-get update
apt-get upgrade

Change “root” Password

This part is optional, if you want to change the “root” password to something that you will be able to remember then use the below command otherwise move on to “Secure ssh”

passwd

Continue reading

© 2024 James Baltar

Theme by Anders NorenUp ↑