Skip to content

Instantly share code, notes, and snippets.

@greenec
Last active December 28, 2021 18:19
Show Gist options
  • Save greenec/ec9301dad3965476e5e582c78f857a9e to your computer and use it in GitHub Desktop.
Save greenec/ec9301dad3965476e5e582c78f857a9e to your computer and use it in GitHub Desktop.
# Set the monitor mode to Source for each Virtual Switch
$portFeature=Get-VMSystemSwitchExtensionPortFeature -FeatureName "Ethernet Switch Port Security Settings"
$portFeature.SettingData.MonitorMode = 2
Add-VMSwitchExtensionPortFeature -ExternalPort -SwitchName "Security Onion WAN Monitoring" -VMSwitchExtensionFeature $portFeature
Add-VMSwitchExtensionPortFeature -ExternalPort -SwitchName "Security Onion LAN Monitoring" -VMSwitchExtensionFeature $portFeature
# Configure VLAN list to pass through for Security Onion to monitor
# Include Wireless, IoT, and Guest networks, and allow untagged traffic for the truested LAN
Set-VMNetworkAdapterVlan -VMName Sentinel -Trunk -AllowedVlanIdList "20, 30, 40" -NativeVlanId 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment