-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Analyze rule block to connectivity (#292)
* adding example * externalIPs * working version * ER * endpoints of scope * suppressTest * reorg * remove getRuleIPBlocks() * bug fix * fmt * reorg ip blocks * rename getAllRulesIPBlocks() * fmt
- Loading branch information
1 parent
e2bd28b
commit ec60301
Showing
13 changed files
with
179 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
Analyzed connectivity: | ||
Source |Destination |Permitted connections | ||
A |B |TCP dst-ports: 445 | ||
B |C |TCP dst-ports: 443 | ||
Source |Destination |Permitted connections | ||
1.2.0.0/24 |A |TCP | ||
1.2.1.0/24 |A |ICMP,TCP | ||
1.2.2.0/24 |A |ICMP | ||
1.2.3.0/24 |A |ICMP,UDP | ||
1.2.4.0/24 |A |UDP | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package topology | ||
|
||
import ( | ||
"github.com/np-guard/models/pkg/netset" | ||
) | ||
|
||
type ExternalIP struct { | ||
ipBlock | ||
} | ||
|
||
func NewExternalIP(block *netset.IPBlock) *ExternalIP { | ||
e := &ExternalIP{ipBlock: ipBlock{Block: block, originalIP: block.String()}} | ||
return e | ||
} | ||
|
||
func (ip *ExternalIP) Name() string { return ip.originalIP } | ||
func (ip *ExternalIP) String() string { return ip.originalIP } | ||
func (ip *ExternalIP) Kind() string { return "external IP" } | ||
func (ip *ExternalIP) ID() string { return ip.originalIP } | ||
func (ip *ExternalIP) InfoStr() []string { | ||
return []string{ip.Name(), ip.ID(), ip.Name()} | ||
} | ||
func (ip *ExternalIP) Tags() []string { return nil } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.