Results 1 to 1 of 1
  1. #1
    Newbie
    Join Date
    Feb 2021
    Posts
    3

    Default Untangle on HyperV Virtual Machines and VLAN tagging *Howto*

    Hi Everyone,

    I recently moved my untangle environment from a physical machine to a VM and thought I would pass on my learnings to other users, who may wish to do the same. As I didnt see much elsewhere about this issue.

    Now - if you dont have any VLAN tagging to worry about, its all very straight forward. Add your two interfaces (LAN/WAN) and your away! Make a note of the assigned MAC addresses to each NIC, so you can identify them in the setup wizard.

    Side note: Dont use DYNAMIC MEMORY on the Untangle VM, I found that it decided to chew nearly all of my memory on the host. So in short, dont select use dynamic memory when configuring the VM. Just use a fixed amount of RAM and your friends and colleagues in the IT team will not hurt you for sucking all the memory on the host.

    If you have multiple VLAN's internally or externally then this is where the fun starts!

    Now lets start with this simple fact, when you configure an interface on HyperV, it will be a standard ACCESS PORT. So you can assign a single VLAN from HyperV Manager and your done.

    However, if you want untangle to handle MULTIPLE VLAN's, you will have to configure the interface as a TRUNK PORT. Only when this is done, will you be able to pass multiple VLAN's from untangle to the rest of your network.

    So lets start.

    Create your untangle VM with a single NIC, either Generation 1 or Generationm 2. It will most likely be called "Network Adapter" and at this moment, and we will assume its your internal (Local LAN) Network card and the VM name is "untangle". Just to keep it simple.

    So first things first, lets rename this "Network Adapter" to "LocalLAN" - so we can easily identify it.

    Open Powershell as administrator on the host and we run the following command:

    Rename-VMNetworkAdapter -VMName Untangle -Name "Network Adapter" -NewName "LocalLAN"

    Easy and that's done! So now add your second network adapter in either the GUI or via Powershell .

    Add-VMNetworkAdapter -VMName Untangle -Name "WAN" -SwitchName "WanSwitch"

    In the above, we assume your external vswitch is called "WANSwitch". Great - We now have a VM with two correctly named interfaces, now lets add the VLAN's to it.

    In this example below, our internal LAN needs access to the following VLAN's 8,100,111,120,121,130 and 1001" with a native VLAN of 0.

    So in powershell we do this:

    Set-VMNetworkAdaptervlan -VMName Untangle -VMNetworkAdapterName "LocalLAN" -Trunk -AllowedVlanIdList "8, 100, 111, 120, 121, 130, 1001" -NativeVlanId 0

    And our Local LAN is now configured correctly. But our WAN interface? It needs access to VLAN's 51,88 and a native VLAN of 10. So we do the following in Powershell:

    Set-VMNetworkAdaptervlan -VMName Untangle -VMNetworkAdapterName "WAN" -Trunk -AllowedVlanIdList "51,88" -NativeVlanId 10

    And we are done with HyperV. If you want to check your configuration, do this in powershell:

    Get-VMNetworkAdapterVLAN -VMName untangle

    It will display your VLAN configurations and if they are exactly what you need, then start your Untangle VM and configure your VLAN interfaces and all of your VLAN's will now pass traffic.

    *Note* - the configuration changes done in Powershell are ONLY visible in Powershell and NOT in the GUI. So if you make a change in the GUI to your Network adapters, it will break whatever you have done in powershell and leave you scratching your head when everything breaks. So be warned people!

    Hope this helps someone else as I found it to be a pain when I first did this on HyperV and spent a while figuring out why my traffic wasnt passing between virtual switches and my physical switches.

    Thanks,
    Old fart from down under.
    Last edited by jumpingnerd; 02-26-2021 at 03:01 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2