Skip to content

Commit

Permalink
🔧 Only allow trafiic on port 53 to/from DNS server
Browse files Browse the repository at this point in the history
  • Loading branch information
jemrobinson committed Aug 24, 2023
1 parent f89e7b6 commit 90cf0f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions data_safe_haven/pulumi/components/sre_dns_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __init__(
access=network.SecurityRuleAccess.ALLOW,
description="Allow inbound connections from attached.",
destination_address_prefix=props.ip_range_prefix,
destination_port_ranges=["53", "3000"],
destination_port_ranges=["53"],
direction=network.SecurityRuleDirection.INBOUND,
name="AllowSREInbound",
priority=NetworkingPriorities.INTERNAL_SRE_ANY,
Expand Down Expand Up @@ -235,10 +235,6 @@ def __init__(
port=53,
protocol=containerinstance.ContainerGroupNetworkProtocol.UDP,
),
containerinstance.ContainerPortArgs(
port=80,
protocol=containerinstance.ContainerGroupNetworkProtocol.TCP,
),
],
resources=containerinstance.ResourceRequirementsArgs(
requests=containerinstance.ResourceRequestsArgs(
Expand Down
2 changes: 1 addition & 1 deletion data_safe_haven/pulumi/components/sre_networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ def __init__(
access=network.SecurityRuleAccess.ALLOW,
description="Allow outbound connections to DNS servers.",
destination_address_prefix=dns_servers_prefix,
destination_port_ranges=["53", "3000"],
destination_port_ranges=["53"],
direction=network.SecurityRuleDirection.OUTBOUND,
name="AllowDNSServersOutbound",
priority=NetworkingPriorities.INTERNAL_SRE_DNS_SERVERS,
Expand Down

0 comments on commit 90cf0f9

Please sign in to comment.