Pass External Data through Microsoft Hyper-V
You can pass data from an external source, such as a router, through Hyper-V to the Tenable Nessus Network Monitor server. This allows you to mirror traffic from an internal virtual machine to an internal instance of Tenable Nessus Network Monitor.
Note: This can only be done on Windows 2012 with a hot patch (http://support.microsoft.com/kb/2885541/en-us) or on Windows 2016. These steps do not apply to Windows 2008.
To pass external data through Hyper-V to an internal instance of Tenable Nessus Network Monitor:
- Power down your virtual machine.
- Under Actions on the monitored virtual machine, navigate to the Settings option.
- Click SPAN/Mirror NW Adapter - Advanced Features.
- In the Port Mirroring section, from the Mirroring Mode drop-down, select Destination.
- Click Apply.
- Click OK.
- Start your virtual machine.
-
To enable mirror source on the external interface, run the following command:
Note: Values in red must be changed to match your specific virtual machine configuration.
$a = Get-VMSystemSwitchExtensionPortFeature -FeatureId 776e0ba7-94a1-41c8-8f28-951f524251b5
$a.SettingData.MonitorMode = 2
add-VMSwitchExtensionPortFeature -ExternalPort -SwitchName "<MS VSwitch Name>" -VMSwitchExtensionFeature $a
-
To set all VLANs and native VLAN on the span port, run the following command:
Note: Values in red must be changed to match your specific virtual machine configuration.
Get-VMNetworkAdapter -VMName “<VMName>” | Where-Object -Property MacAddress -eq "<VM_MAC_Address>" | Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList "1-4094" -NativeVlanId