Thursday, March 19, 2015

networking - physical to virtual (kvm) migration with saving IP of guest and reusing it at host

I want to do a physical-to-virtual migration of BSD server, saving the IP address. The destination virtual host is Linux/KVM.



The current setup: I had a BSD server with failed Hardware. I have just replaced it with a new server, and its HardWare is too new to be used by BSD directly.




So, I have Linux on new server and want to move the BSD into virtualization with KVM.



I have full HDD dump of old server.



The problem is: I have only single real IP and I should use this IP both in guest and in host.



I want to use the IP on the guest because it is a mail server and I want my Real IP to be used in mail headers.



Usage of the IP on the host is because I have no any other IP.




TCP Services of the machines are:




  • sshd on host at non-standard port;

  • sshd on guest

  • smtp of guest, POP3/IMAP of guest.

  • Outgoing SMTP, HTTP, FTP requests must be enabled from guest.



Ports 22,25,53,110 will be just forwarded from host to guest using iptables. If it is possible I would also forward guest's DNS server into realIP.




How should I configure KVM network and libvirt to achieve same IP usage in guest and in host?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...