On Mon, 18 Dec 2023 at 02:36, Philipp Hahn <h...@univention.de> wrote:
> Am 15.12.23 um 16:21 schrieb Stefan Hajnoczi:
> >> Am 05.12.23 um 15:44 schrieb Stefan Hajnoczi:
> >>> On Tue, 5 Dec 2023 at 04:53, Philipp Hahn <h...@univention.de> wrote:
> >> My main problem currently is cloning the MAC address: As our product is
> >> an operating system the MAC addresses of the involved systems is stored
> >> in some databases; while in most cases they are not required, I do not
> >> want to hunt for these in all kind of different locations and change
> >> them to some cloned MAC address.
> >> I already had a look at "Virtual Routing and Forwarding"², which allows
> >> me to resue the same MAC addresses in different network bridge
> >> interfaces, but what I did not yet get to work is the "routing" between
> >> them. I found some very nice articles³⁴ on how to do NAT with VRF, but
> >> it is not yet working.
> >
> > I'm not knowledgeable about VRF. You could also use -netdev
> > user,hostfwd=tcp::$VM_SSH_NAT_PORT-:22 where VM_SSH_NAT_PORT is a
> > unique port assigned by the script that launches the guest. That way
> > each guest can have the same MAC address and IP address but receive
> > incoming SSH connections.
>
> Good to know, thank you. My problem is that I have to clone multiple VMs
> belonging together, they must be able to communicate with each other
> using their unmodified IP addresses; I only need to connect to one of
> them from the outside; something like a "jump host".

--netdev user,guestfwd= redirects outgoing connections from a guest.
That might allow you to remap the IP/port of each VM as necessary.

Stefan

Reply via email to