RHEL / Centos Linux Disable Firewall
[a] /etc/init.d/iptables – IPv4 iptables firewall service.
[b] /etc/init.d/ip6tables – IPv6 iptables firewall service.
Disable firewall
Type the following command as the root user to disable firewall for IPv4:
Sample outputs:
# 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):
Enable firewall
Type the following command as the root user to enable firewall for IPv4:
Sample outputs:
# 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
Verify that firewall is disabled
Type the following command as root user to see IPv4 firewall rules:
OR
The following output indicates that firewall is not active:
# /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
(b) IPv6
Type the following command as the root user to disable firewall for IPv6 :
# service ip6tables save
# service ip6tables stop
# chkconfig ip6tables off
Type the following command as root user to see IPv6 firewall rules:
OR
# /sbin/ip6tables -L -v -n
OR
# service ip6tables status
No comments:
Post a Comment