Skip to content

Commit 5e230de

Browse files
committed
Modify nsg rules
1 parent ac939a7 commit 5e230de

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

infra/aks/components/networking.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def __init__(
8989
description="Allow HTTPS traffic for Harbor",
9090
),
9191
network.SecurityRuleArgs(
92-
name="AllowSSHServerInbound",
92+
name="AllowAdminSSHServerInbound",
9393
priority=200,
9494
direction=network.SecurityRuleDirection.INBOUND,
9595
access=network.SecurityRuleAccess.ALLOW,
@@ -102,6 +102,20 @@ def __init__(
102102
destination_address_prefix="*",
103103
description="Allow SSH traffic to API Proxy SSH server",
104104
),
105+
network.SecurityRuleArgs(
106+
name="AllowUserSSHServerInbound",
107+
priority=300,
108+
direction=network.SecurityRuleDirection.INBOUND,
109+
access=network.SecurityRuleAccess.ALLOW,
110+
protocol=network.SecurityRuleProtocol.TCP,
111+
source_port_range="*",
112+
destination_port_range="2800",
113+
source_address_prefixes=args.config.require_object(
114+
"user_ip_allowlist"
115+
),
116+
destination_address_prefix="*",
117+
description="Allow SSH traffic to API Proxy SSH server",
118+
),
105119
# Allow Azure Load Balancer health probes
106120
network.SecurityRuleArgs(
107121
name="AllowAzureLoadBalancerInbound",

0 commit comments

Comments
 (0)