Skip to content
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

Add additional firewall information #516

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions Kubernetes/windows/debug/collectlogs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ Get-NetAdapter -IncludeHidden | foreach {
$_ | FL * | Out-File -Append -FilePath "adapters\$fileName" -Encoding ascii
}

New-Item -Path firewall -ItemType Directory
cd firewall
Get-NetFirewallRule -PolicyStore ActiveStore >> firewall.txt
reg.exe query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy /s > fwpol.txt
reg.exe query HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall /s > gppol.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line produces an empty file gppol.txt for me. Can't find this path in the registry. It could be my environment though?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. I did a bunch of output on mine.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my experience, it will only have an output if rules have been applied through group policy. This is typically through some IT management software.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it on Windows Client and Windows Server, but either way if it worked on other machines and depends on group policy LGTM

cd $outDir

New-Item -Path wfp -ItemType Directory
cd wfp
Expand Down