Pfsense in Hyper-V, how to share the WAN IP of the host machine?

  • I have 2 locations which i want to connect with a site to site vpn. Both locations do have a windows server with hyper-v, pfsense is running as virtual machine.
    At location A, the hyper-v server is behind a NAT/firewall
    At location B, the hyper-v server is directly connected to the internet (i think because it's a hired dedicated server), it has a public ip address set on hes NIC.

    The problem is location B. I don't know how the Pfsense virtual machine can communicate with the internet. The virtual machine does have 2 nics: 1 x WAN and 1 x LAN. How do i need to setup the WAN connection?

  • If you don’t have more than one ip-adress you can’t share the WAN connection.
    What you can do,

    • disable the IPv4 protocol on the WAN adaptor on the server.
    • Share the WAN adaptor with the virtual pfSense.

    pfSense will acquire the WAN ip-adress and can route it to your virtual images

    For the hyper-v host you can add a virtual adaptor, in this situation hyper-v can route to the hyper-v host.

  • On site B you create two networks in Hyper-V of the external type
    Lets call them Outside and Inside
    You assign the wan nic to outside and the lan nic to inside

    Make sure that the "allow management operating system …." checkbox is selected on inside and is NOT selected on outside

    Now create a virtual machine for PFSense and give it one nic from Inside and one from Outside.

    After the installation of PFSense is complete your wan traffic will com in on the Wan nic, pass through the Outside virtual switch and reach the Pfsense box outside interface.
    Pfsense will then forward the trafic to its internal interface connected to the internal Virtual switch. Since the host machine is allowed to see that switch the trafic can reach it

Log in to reply