Skip to content

Commit

Permalink
Add IPv6 addresses for NTP and EC2Config to default denylist
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Mick authored and Chnwanze committed Jun 27, 2024
1 parent 13fbc1c commit 4627168
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ To set up your own custom configuration for the agent:
* SessionWorkersLimit (int)
* Default: 1000
* DeniedPortForwardingRemoteIPs ([]string)
* Default: ["169.254.169.254", "fd00:ec2::254", "169.254.169.253", "fd00:ec2::253"]
* Default: [ "169.254.169.254", "fd00:ec2::254", "169.254.169.253", "fd00:ec2::253", "169.254.169.123", "fd00:ec2::123", "169.254.169.250", "169.254.169.251", "fd00:ec2::240"]
* Agent - represents metadata for amazon-ssm-agent
* Region (string)
* OrchestrationRootDir (string)
Expand Down
4 changes: 2 additions & 2 deletions agent/appconfig/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ const (
DefaultRunAsUserName = "ssm-user"
)

// Default deny list IP addresses for remote host port forwarding: IMDS ipv4, IMDS ipv6, VPC ipv4, VPC ipv6, Amazon Time Sync Service, Amazon Windows license activation
var DefaultDeniedPortForwardingRemoteIPs = []string{"169.254.169.254", "fd00:ec2::254", "169.254.169.253", "fd00:ec2::253", "169.254.169.123", "169.254.169.250"}
// Default deny list IP addresses for remote host port forwarding: IMDS (ipv4, ipv6); VPC (ipv4, ipv6); Amazon Time Sync (ipv4, ipv6); Amazon Windows license activation (2x ipv4, ipv6)
var DefaultDeniedPortForwardingRemoteIPs = []string{"169.254.169.254", "fd00:ec2::254", "169.254.169.253", "fd00:ec2::253", "169.254.169.123", "fd00:ec2::123", "169.254.169.250", "169.254.169.251", "fd00:ec2::240"}

// Document versions that are supported by this Agent version.
// Note that 1.1 and 2.1 are deprecated schemas and hence are not added here.
Expand Down
5 changes: 4 additions & 1 deletion amazon-ssm-agent.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
"169.254.169.253",
"fd00:ec2::253",
"169.254.169.123",
"169.254.169.250"
"fd00:ec2::123",
"169.254.169.250",
"169.254.169.251",
"fd00:ec2::240"
]
},
"Agent": {
Expand Down

0 comments on commit 4627168

Please sign in to comment.