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

Commit

Permalink
Ensure firewall flush in RHEL allows all traffic in (issue #79)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbanos committed Jun 29, 2018
1 parent 96a150f commit d1a83b1
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 d1a83b1

Please sign in to comment.