-1

I have two servers, when I restart iptables on the first server it does "Applying firewall rules" but on the second does'nt. What's the problem with the second server ?

First server:

[root@test ~]# service iptables restart

iptables: Flushing firewall rules: [ OK ]

iptables: Setting chains to policy ACCEPT: filter [ OK ]

iptables: Unloading modules: [ OK ]

iptables: Applying firewall rules: [ OK ]

Second server:

[root@test ~]# service iptables restart

iptables: Flushing firewall rules: [ OK ]

iptables: Setting chains to policy ACCEPT: nat [ OK ]

iptables: Unloading modules: [ OK ]

Thank you.

2
  • What does service iptables status say ? Are there any interesting messages in your logs ?
    – user9517
    Aug 18, 2013 at 16:13
  • You should really know the basics what the system does when issuing the service command. (It uses the scripts in /etc/init.d/.... This is not very professional.
    – Marki
    Aug 18, 2013 at 16:51

1 Answer 1

1

Here we go:

restart() {
    [ "x$IPTABLES_SAVE_ON_RESTART" = "xyes" ] && save
    stop
    start
}

and

start() {
    # Do not start if there is no config file.
    [ ! -f "$IPTABLES_DATA" ] && return 6

    # check if ipv6 module load is deactivated
    if [ "${_IPV}" = "ipv6" ] \
        && grep -qIsE "^install[[:space:]]+${_IPV}[[:space:]]+/bin/(true|false)" /etc/modprobe.conf /etc/modprobe.d/* ; then
        echo $"${IPTABLES}: ${_IPV} is disabled."
        return 150
    fi

    echo -n $"${IPTABLES}: Applying firewall rules: "

If there is nothing changed in your scripts - it works. You just can't see it.

(rpm -V iptables)

What's the content of /etc/sysconfig/iptables and /etc/sysconfig/iptables-config ?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .