Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

Commit

Permalink
Merge pull request #80 from ingrammicro/bugfix/79-rhel-firewall-flush
Browse files Browse the repository at this point in the history
Ensure firewall flush in RHEL allows all traffic in (issue #79)
  • Loading branch information
pbanos authored Jun 29, 2018
2 parents 96a150f + d1a83b1 commit ad83190
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions firewall/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package firewall

import (
"fmt"
"os"

log "github.com/Sirupsen/logrus"
"github.com/ingrammicro/concerto/utils"
Expand Down Expand Up @@ -43,6 +44,9 @@ func apply(policy Policy) error {
}

func flush() error {
if _, err := os.Stat("/etc/redhat-release"); err == nil {
utils.RunCmd("firewall-cmd --set-default-zone=trusted")
}
utils.RunCmd("/sbin/iptables -w -P INPUT ACCEPT")
utils.RunCmd("/sbin/iptables -w -F CONCERTO")
utils.RunCmd("/sbin/iptables -w -D INPUT -j CONCERTO")
Expand Down

0 comments on commit ad83190

Please sign in to comment.