Port forwarding in vSphere is really important, especially when you want to centralize traffic to a SIEM and looking at the network traffic within the network. This setup was meant to record the internal traffic, meaning traffic between hosts so we can inspect that traffic. vSphere makes this really easy to port forward traffic from one virtual machine to another, it is quite literally a click and point adventure. But, in order to understand this you have to understand what a distributed switch is and how it works.
Think of a distributed switch as just how you put your virtual machines on a network in vSphere. As what a switch does, it just connects to end devices, and we can segregate networks using VLANs or Port Groups, which is what you use to actually connect different virtual machines.
If you look at the topology next to this text, the top device is a distributed switch on vSphere, and the end devices below are being connected to 3 types of port groups, the green, red, and blue one. These port groups are essentially VLANs, segregating the network at the Layer 2 level, meaning if they are on the same color port group they can comunicate with devices on the same port group but, not the other ones. And then note the setup to the right does not have internet access.
.png)

In order to get internet access, we have to add something that can route, in this case the router, which has two port groups: The default network which is in yellow that grants access to the internet, then the second one being the port group of the network you want to grant access to. For my GRC lab I have a simple pfsense setup, and it gives IPs to the network and routes traffic to the internet.
The way this lab works is that we mirror traffic the interface of one virtual machine to another. An example of how this works can be seen in the File Transfer Protocol, where you can see the transfers of file through that interface.

Since this is in an internal network, there is no real way to centralize this traffic if there was multiple client devices, since the alternative would just be capturing it at the router level. We can solve this by doing port mirroring on vSphere.
There is a port forward option on vSphere, you just have to click around!
On your dashboard follow these items to configure port forwarding:

Then From there we can click the new button to make a new port mirroring session, and then we can choose distributed port mirroring:

From there we can name the session and enable it if we want to start it right away:

And then we see the different ports that we can port forward as well, we just have to click the green + button above it, then you’ll see the different sources that you can get traffic from. Again, the sources so this is the data you’ll be sending over to someone and they will receive it and be able to inspect. The ingress/egress option is both inbound and outbound traffic from the host machine, so outbound is traffic that the client initiates and the inbound is what it receives:


Then you would select the destinations as well, and you will see that there is no ingress/egress option here because this is where you’re sending it, also please note for the device you send it to I reccomend having a seperate interface with that so the machine does not get confused with all the network traffic that it is receiving:

Then you’ll see you’re done! You can go to the box that you said to send the traffic to and display it:
