Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions images/capi/ansible/windows/node_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
- include_role:
name: cloudbase-init
when: install_cloudbase_init
- include_role:
name: providers
- include_role:
name: runtimes
- include_role:
Expand Down
18 changes: 18 additions & 0 deletions images/capi/ansible/windows/roles/providers/tasks/azure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---

- name: Block traffic to 168.63.129.16 port 80 for cve-2021-27075
win_shell: |
New-NetFirewallRule -DisplayName 'Block-Outbound-168.63.129.16-port-80-for-cve-2021-27075' -Direction Outbound -RemoteAddress '168.63.129.16' -RemotePort '80' -Protocol TCP -Action Block
become: yes
become_method: runas
become_user: SYSTEM
14 changes: 14 additions & 0 deletions images/capi/ansible/windows/roles/providers/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---

- include_tasks: azure.yml
when: packer_builder_type.startswith('azure')
12 changes: 11 additions & 1 deletion images/capi/packer/goss/goss-command.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,14 @@ command:
- "{{.Vars.docker_ee_version}}"
timeout: 30000
{{end}}
{{end}} #end windows

{{if eq .Vars.PROVIDER "azure"}}
Verify firewall rule to block 168.63.129.16:80 for cve-2021-27075:
exit-status: 0
exec: powershell -command "(Get-NetFirewallRule -ErrorAction Stop -DisplayName 'Block-Outbound-168.63.129.16-port-80-for-cve-2021-27075').Enabled"
stdout:
- True
stderr: []
timeout: 30000
{{end}}
{{end}} #end windows