-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #301 from binbashar/fix/cws-locals
Fix/cws locals
- Loading branch information
Showing
8 changed files
with
98 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
locals { | ||
customer_gateways = { | ||
cgw1 = { | ||
bgp_asn = 65220 | ||
ip_address = "172.83.124.10" | ||
tunnel1 = { | ||
inside_cidr = "169.254.10.0/30" | ||
preshared_key = "pr3shr3_k3y1" | ||
} | ||
tunnel2 = { | ||
inside_cidr = "169.254.10.4/30" | ||
preshared_key = "pr3shr3_k3y2" | ||
} | ||
vpn_connection_static_routes_only = true | ||
static_routes = ["10.10.0.0/20", "10.30.0.0/20"] | ||
local_ipv4_network_cidr = "10.0.0.0/16" | ||
#remote_ipv4_network_cidr = "0.0.0.0/0" | ||
}, | ||
cgw2 = { | ||
bgp_asn = 65220 | ||
ip_address = "172.83.124.11" | ||
tunnel1 = { | ||
inside_cidr = "169.254.10.8/30" | ||
preshared_key = "pr3shr3_k3y3" # Use a data source to retrieve secrets from a vault | ||
# Other parameters (https://github.com/binbashar/terraform-aws-vpn-gateway#inputs) | ||
#dpd_timeout_action = "" | ||
#dpd_timeout_seconds = 30 | ||
#ike_versions = ["ikev1", "ikev2"] | ||
#phase1_dh_group_numbers = [2, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24] | ||
#phase1_encryption_algorithms = ["AES128", "AES256", "AES128-GCM-16", "AES256-GCM-16"] | ||
#phase1_lifetime_seconds = 28800 | ||
#phase2_dh_group_numbers = [2, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24] | ||
#phase2_encryption_algorithms = ["AES128", "AES256", "AES128-GCM-16", "AES256-GCM-16"] | ||
#phase2_lifetime_seconds = 3600 | ||
#rekey_fuzz_percentage = 100 | ||
#rekey_margin_time_seconds = 540 | ||
#replay_window_size = 1024 | ||
#startup_action = "add" | ||
} | ||
tunnel2 = { | ||
inside_cidr = "169.254.10.12/30" | ||
preshared_key = "pr3shr3_k3y4" # Use a data source to retrieve secrets from a vault | ||
# Other parameters (https://github.com/binbashar/terraform-aws-vpn-gateway#inputs) | ||
#dpd_timeout_action = "" | ||
#dpd_timeout_seconds = 30 | ||
#ike_versions = ["ikev1", "ikev2"] | ||
#phase1_dh_group_numbers = [2, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24] | ||
#phase1_encryption_algorithms = ["AES128", "AES256", "AES128-GCM-16", "AES256-GCM-16"] | ||
#phase1_lifetime_seconds = 28800 | ||
#phase2_dh_group_numbers = [2, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24] | ||
#phase2_encryption_algorithms = ["AES128", "AES256", "AES128-GCM-16", "AES256-GCM-16"] | ||
#phase2_lifetime_seconds = 3600 | ||
#rekey_fuzz_percentage = 100 | ||
#rekey_margin_time_seconds = 540 | ||
#replay_window_size = 1024 | ||
#startup_action = "add" | ||
} | ||
#static_routes = ["10.40.0.0/20", "10.50.0.0/20"] | ||
} | ||
} | ||
} |
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
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,28 @@ | ||
# Domain list inspection for traffic from outside the Network Firewall VPC | ||
To use domain name filtering for traffic from outside the VPC where you've deployed Network Firewall, you must manually set the `HOME_NET` variable for the rule group. The most common use case for this is a central firewall VPC with traffic coming from other VPCs through a transit gateway. | ||
|
||
Include the `HOME_NET` variable in the dtaeful group definiton as follow: | ||
|
||
``` | ||
# Stateful rules | ||
stateful_rule_groups = { | ||
# rules_source_list examples | ||
stateful-group-1 = { | ||
description = "Stateful Inspection for denying access to domains" | ||
capacity = 100 | ||
rule_variables = { | ||
ip_sets = { | ||
HOME_NET = ["0.0.0.0/0"] | ||
} | ||
} | ||
rules_source_list = { | ||
generated_rules_type = "DENYLIST" | ||
target_types = ["TLS_SNI", "HTTP_HOST"] | ||
targets = [".wikipedia.org", ".bad-domain.com"] | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
**Reference**: [Domain list inspection for traffic from outside the deployment VPC](https://docs.aws.amazon.com/network-firewall/latest/developerguide/stateful-rule-groups-domain-names.html#:~:text=see%20Domain%20filtering.-,Domain%20list%20inspection%20for%20traffic%20from%20outside%20the%20deployment%20VPC,-To%20use%20domain) | ||
|
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