Using a VyOS Router with Hyper-V

VyOS is a community fork of Vyatta, a Linux-based network operating system that provides software-based network routing, firewall, and VPN functionality. The distribution includes full virtualization support, drivers and tools which makes it ideal for use with Hyper-V.

Using just two virtual network adapters and extensive use of VLANs, we can potentially configure an unlimited number of of routed sub-networks for our Hyper-V virtual environments. Whether you are just running a virtual lab-on-a-laptop, or a much larger virtual enterprise environment, VyOS can scale to suite your needs.



  1. Hey Chris,
    Nice work! Easy to follow as well. I’ve been doing something similar with 2012R2 Routing and Remote Access with VLANs but I have 2 x hosts running 2012R2 (both with a single NIC) and then have three VLANs that need to be routed. I needed both hosts to be in the domain so I can configure constrained delegation and move VMs between hosts. Have you tried this config on two hosts?

    1. Hi Martin!

      Thanks for you comments 🙂 What you are currently doing with RRAS should be quite easy with VyOS – although I haven’t specifically tried it.

      Kind Regards,

  2. Hi Chris,

    It works! Just started learning VyOs and this guide helps me a lot!
    Thank you very much.


  3. Hi Chris,

    It is possible that I can communicate with the VM into my local machine? I tried to use the Internal Network adapter but I can’t ping the VM’s IP. Thank you in advance.

    1. Hi wks_adm,

      The VyOS configuration presented in the tutorial uses NAT in the same way as a home broadband router, so by default it is not possible for your host machine on the “outside” to communicate with a virtual machine on the “inside”. However, like a router, in VyOS you can setup port forwarding (Desination NAT) – so you can manually setup rules to allow individual outside connections through.

      For example, the following commands enable port forwarding for RDP (TCP 3389) to host

      set nat destination rule 10 description 'RDP to'
      set nat destination rule 10 destination port 3389
      set nat destination rule 10 inbound-interface eth0
      set nat destination rule 10 protocol tcp
      set nat destination rule 10 translation address
      set nat destination rule 10 translation port 3389

      RDP to the VyOS eth0 external address. Use different destination port addresses for multiple hosts with the same service.

      Hope that helps!

  4. Hi Chris,

    Fantastic! I was looking this for kind of tutorial, I followed all the instructions and it works like a Charm
    Thank you very much for spending your time making this great tutorial.

Leave a Reply