Skip to content

Commit

Permalink
Revert "Revert "Patch waagent.conf to add firewall rules (microsoft#7543
Browse files Browse the repository at this point in the history
)" (microsoft#8054)"

This reverts commit eb62644.
  • Loading branch information
christopherco committed Mar 11, 2024
1 parent 6a07685 commit 7c2547e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SPECS/WALinuxAgent/WALinuxAgent.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Summary: The Windows Azure Linux Agent
Name: WALinuxAgent
Version: 2.3.1.1
Release: 3%{?dist}
Release: 4%{?dist}
License: ASL 2.0
Vendor: Microsoft Corporation
Distribution: Mariner
Expand All @@ -11,6 +11,7 @@ Source0: https://github.com/Azure/WALinuxAgent/archive/refs/tags/v%{versi
Source1: ephemeral-disk-warning.service
Source2: ephemeral-disk-warning.conf
Source3: ephemeral-disk-warning
Patch0: add_firewall_rules.patch
BuildRequires: python3-distro
BuildRequires: python3-setuptools
BuildRequires: python3-xml
Expand Down Expand Up @@ -38,7 +39,7 @@ VMs in the Windows Azure cloud. This package should be installed on Linux disk
images that are built to run in the Windows Azure environment.

%prep
%setup -q -n %{name}-%{version}
%autosetup -n %{name}-%{version} -p1

%pre -p /bin/sh

Expand Down Expand Up @@ -90,6 +91,9 @@ python3 setup.py check && python3 setup.py test
%{python3_sitelib}/*

%changelog
* Tue Jan 30 2024 Nan Liu <liunan@microsoft.com> - 2.3.1.1-4
- Patch waagent.conf to add firewall rules to protect access to Azure host node

* Tue Nov 10 2022 Nan Liu <liunan@microsoft.com> - 2.3.1.1-3
- Add ephemeral-disk-warning.service

Expand Down
24 changes: 24 additions & 0 deletions SPECS/WALinuxAgent/add_firewall_rules.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 9ac40d805925f130283ed54f3cbb424afad41461 Mon Sep 17 00:00:00 2001
From: Nan Liu <liunan@microsoft.com>
Date: Tue, 30 Jan 2024 17:58:36 +0000
Subject: [PATCH] Add firewall rules to protect access to Azure host node
services

---
config/mariner/waagent.conf | 3 +++
1 file changed, 3 insertions(+)

diff --git a/config/mariner/waagent.conf b/config/mariner/waagent.conf
index 65da131..cda61de 100644
--- a/config/mariner/waagent.conf
+++ b/config/mariner/waagent.conf
@@ -78,3 +78,6 @@ AutoUpdate.GAFamily=Prod
# handling until inVMArtifactsProfile.OnHold is false.
# Default is disabled
# EnableOverProvisioning=n
+
+# Add firewall rules to protect access to Azure host node services
+OS.EnableFirewall=y
--
2.25.1

0 comments on commit 7c2547e

Please sign in to comment.