Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can i limit Xen VMs so that they only work with some specified IPs?

Eg.: vm01 should have IP If it tries to change to another IP, it will simply not work and vm will lose connectivity.

Something like it's done on EC2, they surely limit so you can only assign your own ips.


share|improve this question
up vote 1 down vote accepted

It depends on how you are managing your VMs.

However, you can configure the firewall on the VM host to do this. You can set up rules that work only with the specific MAC address of the virtual ethernet card. The virtual ethernets are typically bridged onto a host.

You can also use a different IP/subnet combination for each individual IP and then perform the necessary routing on the host firewall as well.

You can even employ some VLAN tagging if your equipment supports it to logically isolate the different machines onto different networks.

Essentially, it's all networking.

share|improve this answer

The simplest solution would be to set up according iptables-rules in the Dom0 for the VIFs of that DomU (rather than using the MAC-address).

These rules should allow all incoming traffic, all outgoing multicast/broadcast but only unicast for the IP the VM is supposed to have.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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