Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-555

firewall module can't purge and stop firewall

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: firewall
    • Labels:
      None
    • Template:

      Description

      I'm trying to purge all iptable rules and also stop the iptables service. Unfortunately, service is stopped in the middle of purging rules and the remaining rules all fail:

      Notice: /Stage[main]/Profile::Profile_base/Firewall[9336 dc0f1adfee77aa04ef7fdf348860a701]/ensure: removed
      Notice: /Stage[main]/Firewall::Linux::Redhat/Service[iptables]/ensure: ensure changed 'running' to 'stopped'
      Error: Execution of '/sbin/iptables -t filter -D INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT' returned 1: iptables: Bad rule (does a matching rule exist in that chain?).

      Error: /Stage[main]/Profile::Profile_base/Firewall[9244 dc0f1adfee77aa04ef7fdf348860a701]/ensure: change from present to absent failed: Execution of '/sbin/iptables -t filter -D INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT' returned 1: iptables: Bad rule (does a matching rule exis t in that chain?).

      I tried to do this also, but that didn't help:

      Firewall <| |>

      { ensure => absent, }

      -> Service['iptables']
      resources

      { 'firewall': purge => true, before => Service['iptables']}

      class

      { 'firewall': ensure => stopped,}

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            falcas cristi falcas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support