Get the most out of your Centmin Mod LEMP stack
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

    50,891
    11,791
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,246
    Local Time:
    3:51 AM
    Nginx 1.25.x
    MariaDB 10.x
    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.