Skip to content

Commit 21efccf

Browse files
committed
Feedback: allow limited ICMP into external DNS zones.
1 parent ef9f701 commit 21efccf

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

nexus/db-fixed-data/src/vpc_firewall_rule.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,12 @@ pub const NEXUS_ICMP_FW_RULE_NAME: &str = "nexus-icmp";
7777
/// Built-in VPC firewall rule for Nexus.
7878
///
7979
/// This rule allows *arbitrary forwarding nodes* on the network to inform the
80-
/// Nexus zone that packets have been explicitly dropped. This is a key part in
81-
/// enabling path MTU discovery, such as when customers are accessing Necus
80+
/// Nexus/DNS zones that packets have been explicitly dropped. This is a key part
81+
/// in enabling path MTU discovery, such as when customers are accessing Nexus
8282
/// over a VPN.
8383
///
84-
/// Note that we currently rely on this being exactly one rule to implement the
85-
/// system-level enable/disable endpoint. See `nexus/networking/src/firewall_rules.rs`
86-
/// for more details.
84+
/// We currently rely on this being exactly one rule to implement the system-level
85+
/// enable/disable endpoint. See `nexus/networking/src/firewall_rules.rs`.
8786
pub static NEXUS_ICMP_FW_RULE: LazyLock<VpcFirewallRuleUpdate> =
8887
LazyLock::new(|| VpcFirewallRuleUpdate {
8988
name: NEXUS_ICMP_FW_RULE_NAME.parse().unwrap(),
@@ -92,9 +91,14 @@ pub static NEXUS_ICMP_FW_RULE: LazyLock<VpcFirewallRuleUpdate> =
9291
.to_string(),
9392
status: VpcFirewallRuleStatus::Enabled,
9493
direction: VpcFirewallRuleDirection::Inbound,
95-
targets: vec![VpcFirewallRuleTarget::Subnet(
96-
super::vpc_subnet::NEXUS_VPC_SUBNET.name().clone(),
97-
)],
94+
targets: vec![
95+
VpcFirewallRuleTarget::Subnet(
96+
super::vpc_subnet::NEXUS_VPC_SUBNET.name().clone(),
97+
),
98+
VpcFirewallRuleTarget::Subnet(
99+
super::vpc_subnet::DNS_VPC_SUBNET.name().clone(),
100+
),
101+
],
98102
filters: VpcFirewallRuleFilter {
99103
hosts: None,
100104
protocols: Some(vec![

nexus/tests/integration_tests/schema.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2429,7 +2429,6 @@ fn after_151_0_0<'a>(ctx: &'a MigrationContext<'a>) -> BoxFuture<'a, ()> {
24292429
})
24302430
}
24312431

2432-
24332432
// Lazily initializes all migration checks. The combination of Rust function
24342433
// pointers and async makes defining a static table fairly painful, so we're
24352434
// using lazy initialization instead.

schema/crdb/vpc-firewall-icmp/up08.sql

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@
44
INSERT INTO omicron.public.vpc_firewall_rule (
55
id,
66
name, description,
7-
time_created, time_modified, vpc_id, status, direction,
8-
targets, filter_protocols, action, priority
7+
time_created, time_modified, vpc_id, status,
8+
targets,
9+
filter_protocols,
10+
direction, action, priority
911
)
1012
SELECT
1113
gen_random_uuid(),
1214
-- Hardcoded name/description, see nexus/db-fixed-data/src/vpc_firewall_rule.rs.
1315
'nexus-icmp', 'allow typical inbound ICMP error codes for outbound flows',
14-
NOW(), NOW(), vpc.id, 'enabled', 'inbound',
16+
NOW(), NOW(), vpc.id, 'enabled',
17+
-- Apply to the Nexus and External DNS zones...
18+
ARRAY['subnet:nexus','subnet:external-dns'],
1519
-- Allow inbound ICMP Destination Unreachable (Too Large) and Time Exceeded
16-
ARRAY['subnet:nexus'], ARRAY['icmp:3,4','icmp:11'], 'allow', 65534
20+
ARRAY['icmp:3,4','icmp:11'],
21+
'inbound', 'allow', 65534
1722
FROM omicron.public.vpc
1823
WHERE vpc.id = '001de000-074c-4000-8000-000000000000'
1924
AND vpc.name = 'oxide-services'

0 commit comments

Comments
 (0)