I would like to set up a network on my Server where I run KVM as a hypervisor. The Network will be used for a distributed Jenkins setup.

The goal topology is the following:

  • One machine (Jenkins master) should be accessible from the local network and have internet access.
  • All other machines (Jenkins slave) should only be able to communicate with each other and the above mentioned machine.

I had the idea to do it the following way:

  • Bridged network for the master.
  • Isolated network for the slaves.

Then I thought I could try to give the slaves access to the master by configuring a gateway to the master's subnet and vice versa.

Now I don't know if this is the way to go. How I can provide such a gateway?


First, I would recommend you to use Open vSwitch where you can have a much wide range of configuration and management.

Second, answering your question, you can create a bridge (let's call br0) and add only the Jenkins master VM, then you create a second bridge (let's call br1) and add all the VMs, but not a physical interface (eth0 for example). Finally as you mention, use Jenkins master VM as gateway and maybe firewall.

PS: this procedure is a little long, so let me know if I was vague and you didn't understand fully.

  • Thank you very much for your answer. How can I add the gateway? Should I just add a static route definition from the br0 network to br1 and vice versa? – Mohammed Ajil Mar 6 '16 at 13:01
  • Yes, just write a small script for routing and masquerading all the connections in the Jenkins master VM. – Willian Paixao Mar 7 '16 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.