Hi, Currently my Xen server is working like a charm. I use Xen 3.2.1 with a Debian Etch Dom0 and Etch DomU. The VM have access to the network/internet using NAT. Each VM is given a virtual network interface and a private IP 10.0.0.x. What I would like to do know is that a VM can be directly accessible from another public IP. So my physical server is at 91.121.xx.xx. My VM is at 10.0.0.1 (on that server), and I have a free IP address 91.121.yy.yy (IP failover actually) that points to my physical server. iptables can only redirect packets to an IP that is on the same network. How can I do that? Do I need to specify it in the DomU configuration file as an additionnal network interface for my domU? Can you point me to some resource about that? Thanks _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Daniel Kao
2008-Jul-17  21:00 UTC
Re: [Xen-users] Making a VM directly accessible from a public IP
Hi Thomas, You''re exactly right. You just need to specify it in the DomU configuration file as an additional NIC. Requirements are though that Xen already has a bridged interface that''s attached to your physical "external" NIC in dom0 so that your domU''s can have access to it. Other than that, just update your domU''s configuration with the respective bridged NIC and you''re good to go! Cheers, Daniel Thomas wrote: Hi, Currently my Xen server is working like a charm. I use Xen 3.2.1 with a Debian Etch Dom0 and Etch DomU. The VM have access to the network/internet using NAT. Each VM is given a virtual network interface and a private IP 10.0.0.x. What I would like to do know is that a VM can be directly accessible from another public IP. So my physical server is at 91.121.xx.xx. My VM is at 10.0.0.1 (on that server), and I have a free IP address 91.121.yy.yy (IP failover actually) that points to my physical server. iptables can only redirect packets to an IP that is on the same network. How can I do that? Do I need to specify it in the DomU configuration file as an additionnal network interface for my domU? Can you point me to some resource about that? Thanks _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users -- Daniel Kao Übermind, Inc. Seattle, WA, U.S.A. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thomas
2008-Sep-03  15:44 UTC
Re: [Xen-users] Making a VM directly accessible from a public IP
Hi,
I still haven''t found a solution to this problem.
In my xend-config.sxp file, I have activated the routed mode:
---
(network-script ''network-route netdev=eth0'')
(vif-script     vif-route)
---
In my domU config file I have:
---
vif = [ ''mac=00:16:3e:00:00:01, ip=ip.fail.over'' ]
---
and in /etc/network/interfaces of the domU:
---
auto eth0
iface eth0 inet static
netmask 255.255.255.0
address ip.fail.over
post-up /sbin/ip route add default dev eth0
---
In domU, ifconfig outputs:
---
eth0      Link encap:Ethernet  HWaddr 00:16:3E:00:00:01
          inet addr:ip.fail.over  Bcast:my.ip.adr.255  Mask:255.255.255.0
---
In dom0, ifconfig outputs:
---
eth0      Link encap:Ethernet  HWaddr 00:1B:FC:19:19:36
          inet addr:some.ip  Bcast:some.ip.255  Mask:255.255.255.0
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
vif165.0  Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          inet addr:some.ip  Bcast:91.255.255.255  Mask:255.255.255.255
---
But when I boot the domU, I see the error message:
---
Setting up networking....
Configuring network interfaces...SIOCADDRT: Network is unreachable
Failed to bring up eth0.
done.
---
And obviously I cannot ping my domU public address. I have also
flushed any iptables rule.
I am pretty sure that at some point in time the setup I have posted
above worked, but I tried to reproduce it today, and it doesn''t
anymore, so I guess I dreamed it worked!?
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users