Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling Firewall/iptables on CentOS 7??

Status
Not open for further replies.

jamescpp

IS-IT--Management
Aug 29, 2001
70
US
I googled and attempted things for several hours today without success.

I have a freshly installed CentOS 7 system that I'd like to disable the firewall and all iptables rules. Basically the equivalent of doing iptables -F

In a nutshell I've tried the following commands, in many different ways and orders, but when the system restarts it still seems to end up with some form of default rules. It even has a couple rules specifying 192.168.122.0 and I can't figure out where it's coming from.

#Disable Firewall
systemctl stop firewalld
systemctl disable firewalld
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'
systemctl disable firewalld
systemctl stop firewalld
iptables --flush
iptables --list
iptables -L
yum install iptables-services
service iptables save
systemctl enable iptables
service iptables save

Any help is appreciated.

Thanks
James
 
In order;

[sudo] service iptables save
[sudo] service iptables stop
[sudo] chkconfig iptables off
[sudo] yum -y remove iptables




Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top