Re: [vserver] Changing a guest's IP address during runtime

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Fri 11 Jun 2010 - 13:22:28 BST
Message-ID: <20100611122228.GL3270@MAIL.13thfloor.at>

On Fri, Jun 11, 2010 at 07:04:13PM +0800, Patrick Nagel wrote:
> Hi,

> can the IP address assigned to a guest be changed from the host
> during runtime?

yes

> If so, how?

naddress will allow you to do such manipulations, but
depending on your guest config and applications, there
is a catch with changing IPs

first: if the guest uses the single IP special casing,
0.0.0.0 will be rewritten with the single IP, which
means that you cannot change it at runtime without
restarting guest processes (at least those who did
bind to a port)

second: if the guest process decided to bind to a
specific IP, then you have the same situation as above.

usually it is simpler to use S/DNAT and a private IP
for each guest, because that gives you a lot more
flexibility than 'just' changing guest IPs

> Background info: I have an openvpn client running on the host,
> which provides a VPN connection to one of the guests.
> Recently the IP address of the local VPN endpoint changed.

this is usually an administrative decision and should
not happen that often, no?

> The guest could no longer use the VPN. I had to shut the guest
> down, change /etc/vservers/guest/interfaces/ip to the
> new local VPN endpoint IP address and start it up again.

> Patrick.

best,
Herbert

> --
> STAR Software (Shanghai) Co., Ltd. http://www.star-group.net/
> Phone: +86 (21) 3462 7688 x 826 Fax: +86 (21) 3462 7779
>
> PGP key E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
> Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
>
Received on Fri Jun 11 13:23:31 2010

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 11 Jun 2010 - 13:23:35 BST by hypermail 2.1.8