1

I have a directadmin server running on centos 7 machine. it's running for years. We have our own firewall on the network so we don't need linux firewall anymore but I faced to some problems during deactivating the iptables.

I deactivated iptables using "service iptables stop" or "systemctl stop iptables " and "systemctl disable iptables", nothing happened an I still wasn't able to ping the server from outside. Then I ran "iptables -F" and right after that, the server was inaccessible. nither the site nor the ssh was accessible after that and I shoud connect using vnc.

I'm looking fowrard fo a easy way to get rid of any kind of firewall on the linux and I want all ports and protocols remain open.

Please help me doing this

Thanks

Ethan_m
  • 11
  • 4

2 Answers2

0

CentOS uses something called firewalld

Link to homepage

To stop it use:

systemctl stop firewalld

Then test your connection and permanently disable with

systemctl disable firewalld

It should automatically flush any existing rules.

proxx
  • 121
  • 6
  • Previously I disabled firewalld on this system and iptables is active. When I run "iptables -L" it lists all the rules. In [this thred](https://serverfault.com/questions/626521/centos-7-save-iptables-settings) was said about installing iptables on centos 7 and also said iptables rules are store in "/etc/sysconfig/iptables" but there is not such file that I can remove the rules. – Ethan_m Dec 20 '22 at 07:37
0

as far as I remember CentOS7 by default use firewalld

if you want to disable firewalls & security of Linux system please use below mentioned commands

systemctl disable firewalld
systemctl stop firewalld
systemctl mask firewalld
systemctl disable iptables
systemctl stop iptables
systemctl mask iptables 

to disable SE Linux (temporarily until reboot)

setenforce 0

if you still face any issue please provide us errors

csx4
  • 101
  • 1