-
Notifications
You must be signed in to change notification settings - Fork 260
[Swift] Add snat rule to host IP for IMDS for CNS IPAM #988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,7 +67,8 @@ const ( | |
|
|
||
| // known ports | ||
| const ( | ||
| DNSPort = 53 | ||
| DNSPort = 53 | ||
| HTTPPort = 80 | ||
| ) | ||
|
|
||
| // known protocols | ||
|
|
@@ -78,7 +79,8 @@ const ( | |
|
|
||
| // known IP's | ||
| const ( | ||
| AzureDNS = "168.63.129.16" | ||
| AzureDNS = "168.63.129.16" | ||
| AzureIMDS = "169.254.169.254" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. idk what this is for, specifically, but should we do it for the whole link-local block?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is specifically to allow http traffic to the metadata service from pods. Since NCs are considered "secondary interfaces" and there is an explicit deny rule on the host to drop http traffic from secondary interfaces. So really we only want to snat traffic to this one IP against the host IP , since it gets dropped otherwise. For the rest of link-local there is no explicit deny rule so no need to snat. |
||
| ) | ||
|
|
||
| var ( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment what the rule is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done