Welcome to Centmin Mod Community
Register Now

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

    45,728
    10,382
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,112
    Local Time:
    12:50 AM
    Nginx 1.19.x
    MariaDB 5.5/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.