L
L
LazyGatto2014-08-02 02:10:50
OpenVZ
LazyGatto, 2014-08-02 02:10:50

Proxmox. Second public IP on VM. How to set up correctly?

Good day dear community.
The situation is the following. There is a Proxmox host machine.
One network interface. 2 public (white) IPs from different subnets. Gateways, subnet masks are also different.
The task is next.
IP from the first subnet must be made official, i.e. access to the Proxmox host itself.
Hang up IP from the second subnet on the guest VM (OpenVZ).
It is planned that it will be a kind of gateway for other VMs.
I read both articles on Habré from the "Ideal" cluster series, where exactly a similar situation is considered.
But I can't figure out how to implement such a scheme?
Please tell me, maybe there is more information somewhere, or have there been articles with more intelligibly chewed material? Or can anyone give me some advice?
Thanks in advance ;)
PS Until the end of the week, we plan to connect another physical network interface on the host machine (Just for the second IP). Maybe this can somehow simplify the creation of the necessary configuration?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Petrikov, 2014-08-02
@RicoX

To get a second IP to the guest VM, you need to use brigget mode for the virtual network, not NAT, and then you can set all the necessary settings directly on the virtual machine.

P
Puma Thailand, 2014-08-02
@opium

For openvz you just add an IP address and that's it. It's not clear what exactly your problem is.

L
LazyGatto, 2014-08-02
@LazyGatto

At the moment, the original task is implemented like this.
It turns out two external IPs, one of which is public (*.229), the other is official (*.227).
Those. the necessary services are forwarded through iptables to gw.local on the corresponding ports of other VMs.
There is one more question left.
Tell me, how to do it correctly if you need to access a VM from a service IP?
Those. in fact, what you want to do is to have access to port 80 from IP1, and access to port 8080 from IP2.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question