How to Setup PfSense on Hyper-V with 1 Nic and Network Switch
-
Hi everyone, how can I set up PfSense on Hyper-V with only 1 NIC and TP-Link TP SG108E v6 network switch. I found a video and an article on how to set up PfSense on a 1 NIC device and use a network switch to configure the WAN and LAN. But they install PfSense directly on the machine.
Link to video: https://www.youtube.com/watch?v=z59_MWWPL-Q
Link to article: https://www.joe0.com/2019/11/16/converting-single-nic-mini-pc-into-pfsense-router-firewall-by-using-virtual-lan-configuration-on-a-managed-switch/The machine and OS I'm using: Dell Optiplex 3080 i5 9500T 32GB of RAM - Windows 11
Now, how can I do this configuration on Hyper-V? I don't want to buy an old machine just to try PfSense also I don't have the budget right now to buy an old machine and was trying to set up PfSense so I can have the gist on how to use and configure it. I'm also new to networking setups, VLANs, firewalls, home labs, etc. I just started my HomeLab project a month ago so I'm getting my sources on YouTube, articles, and forums.
Right now I'm trying to add a PfSense firewall to my current machine and stumbled upon this problem. I hope you can walk me through every step because I'm not really familiar with the terms and whatnot. Also, I would really appreciate it if you can also add some learning materials to expand my current knowledge on my Home Lab journey.
Thank you so much, everyone!
-
-
You will need to set the virtual network adapter(s) to trunk mode, see Set-VMNetworkAdapterVlan
If you have more than one vmnetworkadapter you can filter by macaddress, for example:
Get-VMNetworkAdapter -VMName "vmname" | Where-Object {$_.MacAddress -eq "00155D010203"} | Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList "2-9" -NativeVlanId 0