Removed IPTables on Centos 7 and cannot access SFTP since

Posted December 25, 2014 2.1k views

Hello! Recently I removed IPTables on my Centos 7 Droplet and since then I cannot access my server via SFTP only via the Droplet console.. I understand that It has to be some sort of Centos 7 specific Firewall problem? Any suggestions to fix this problem Is much Appreciated.. Thanks!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

CentOS 7 uses firewalld to implement firewalling. To check if it is enabled, run:

sudo systemctl status firewalld

If you use the default port 22 for SSH connections, you can open that port by running:

sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload

For more info, check out the “Configuring a Basic Firewall” section of our Additional Recommended Steps for New CentOS 7 Servers tutorial.

by Justin Ellingwood
After setting up the bare recommended configuration for a new server, there are often some additional steps that are highly recommended in most cases. In this guide, we'll continue the initial configuration by tackling some recommended, but optional procedures.