microsoftgraph / microsoft-graph-comms-samples

Microsoft Graph Communications Samples
MIT License
206 stars 221 forks source link

Windows Defender blocks ports on Azure Cloud Service #370

Open adoronin opened 3 years ago

adoronin commented 3 years ago

Describe the issue Hi all, we have implemented the app based on the AudioVideoPlayback sample. Our app needs to sent data within the bot to outside service from 1688 port. Sometimes that port is blocking, therefore sending data will be stopped in that case.

I tried to use that PowerShell script on runtime after bot deploying to fix that issue:

Set-MpPreference -DisableRealtimeMonitoring $true Set-MpPreference -DisableBehaviorMonitoring $true Set-MpPreference -DisableScanningNetworkFiles $true Set-MpPreference -DisableIntrusionPreventionSystem $true Set-MpPreference -DisableScriptScanning $true

$rule = Get-NetFirewallRule -DisplayName "Allow Out 1688 TCP" 2> $null; if (!$rule) { New-NetFirewallRule -DisplayName "Allow Out 1688 TCP" -Direction Outbound -LocalPort Any -RemotePort 1688 -Protocol TCP -Action Allow
}

$rule = Get-NetFirewallRule -DisplayName "Allow Out 1688 UDP" 2> $null; if (!$rule) { New-NetFirewallRule -DisplayName "Allow Out 1688 UDP" -Direction Outbound -LocalPort Any -RemotePort 1688 -Protocol UDP -Action Allow }

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

Get-Service -DisplayName "Windows Modules Installer" | Stop-Service

But that didn't help us. The sending data usually prevents in 3-5 hours after the call starts. Any ideas, please? This issue is stopping us from going to production.

adoronin commented 3 years ago

Also, we have found that the process "Antimalware Service Executable" is running on VM even when the option Antimalware is disabled on Azure portal. Maybe that caused the issue?