Learn about Centmin Mod LEMP Stack today
Become a Member

Sysadmin How To Regain SSH Access After Being Locked Out Of CSF Firewall Servers

Discussion in 'System Administration' started by eva2000, Nov 22, 2020.

Thread Status:
Not open for further replies.
  1. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    6:25 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    If you run the SSH command, iptables -F you may end up locking yourself out of the server as this command flushes all the existing IPTable rules that are configured and setup by CSF Firewall at startup.

    This guide will outline ways you can possibly regain SSH access using example VPS provider's respective out of band console access. You can use the console method to also regain access if you lost your SSH keys if you set SSH authentication provided you still allowed SSH password authentication.

    I wrote a blog guide on how you can use console access with the following cloud VPS hosting providers - Upcloud, DigitalOcean, Vultr, Linode, Hetzner and Amazon AWS EC2 instance servers at https://blog.centminmod.com/2020/11...er-being-locked-out-by-iptables-csf-firewall/.
Thread Status:
Not open for further replies.