How do I disable firewall under CentOS Linux version 6.x running on my HP micro server?
You need to disable the following services to disable firewall under Red Hat Enterprise Linux or CentOS Linux version 4 / 5 / 6.
[a] iptables - IPv4 iptables firewall service.
[b] ip6tables - IPv6 iptables firewall service.
Task: Disable firewall
Type the following command as the root user to disable firewall for IPv4:
# service iptables save
# service iptables stop
# chkconfig iptables off
Sample outputs:
iptables: Flushing firewall rules: [ OK ] iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Unloading modules: [ OK ]
Sample output with verification (see below):
Type the following command as the root user to disable firewall for IPv6 :
# service ip6tables save
# service ip6tables stop
# chkconfig ip6tables offTask: Enable firewall
Type the following command as the root user to enable firewall for IPv4:
# service iptables start
# chkconfig iptables on
Sample outputs:
iptables: Applying firewall rules: [ OK ]
Type the following command as the root user to disable firewall for IPv6 :
# service ip6tables start
# chkconfig ip6tables on
Task: Verify that firewall is disabled
Type the following command as root user to see IPv4 firewall rules:
# /sbin/iptables -L -v -n
OR
# service iptables status
The following output indicates that firewall is not active:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination
Type the following command as root user to see IPv6 firewall rules:
# /sbin/ip6tables -L -v -n
OR
# service ip6tables status
Check out related media
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop















{ 1 comment… read it below or add one }
Estupenda informacion. Clara y justo lo que necesitaba.
Muchas gracias