-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
firewall shenanigans and af specialization
- Loading branch information
Showing
5 changed files
with
58 additions
and
4 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
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,5 @@ | ||
#lang racket | ||
|
||
(require rackunit) | ||
(require "util.rkt") | ||
(require "vyos-firewall.rkt") |
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,29 @@ | ||
#lang racket | ||
|
||
(require rebellion/type/record) | ||
(require racket/match) | ||
(require "util.rkt") | ||
|
||
(provide | ||
dn42-tunnels-in) | ||
|
||
(define dn42-allowed-transit-addrs | ||
(dual-stack '("10.0.0.0/8" | ||
"172.20.0.0/14" | ||
"172.31.0.0/16") | ||
'("fd00::/8"))) | ||
|
||
(define ifd3f-dn42-addrs | ||
(dual-stack '("172.23.7.176/28") | ||
'("fd00:ca7:b015::/48"))) | ||
|
||
(define (dn42-tunnels-in) | ||
`[(rule 10 [(description "Allow peer transit") | ||
(src ,(dual-stacked-suffix "dn42-allowed-transit")) | ||
(dst ,(dual-stacked-suffix "dn42-allowed-transit")) | ||
(action drop)]) | ||
|
||
(rule 20 [(description "Block traffic to operator-assigned IP space") | ||
(src ,(dual-stacked-suffix "dn42-allowed-transit")) | ||
(dst ,(dual-stacked-suffix "ifd3f-dn42")) | ||
(action drop)])]) |