Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i have an CentOS (Redhat) Linux server and on it is installed OpenVZ which allows creating virtual machines there.
Now to my CentOS host server is pointed a few IP-RIPE addresses, these IPs are mentioned in several domains nameservers, i want to migrate virtual machines to another server and my question is how i can achieve that websites which domains pointing to old server will resolve and work and load from a new server? (meaning there will be redirection on server which redirect old ip request to a new IP of new server) If it would be possible, redirecting all kind of requests, but for simplicity, HTTP most important
You'll have to turn on forwarding as well. Usually there is a sysctl.conf file you can turn it on permanently in (/etc/sysctl.conf). The entry will look something like net.ipv4.ip_forward=1
You can turn it on temporarily by doing: echo 1 > /proc/sys/net/ipv4/ip_forward
thanks, your IP tables rules should be done probably on each Virtual Machine.
i meant to do it from VM host server, but such iptables rule would need to contain probably two IPs, old and new.. each rule for each VM? Is it possible to do from host server, how such command can look like?
Those rules only need to be done on the server that originally hosted the service.
With regards to using the VM host server. If it has the original (old) ip then the rules would go on it. If those ips are externally routable then easiest would probably be to update your dns to use the new ips.
You'd need a rule for each service you were redirecting, the only thing that'd change is the port and new ip
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.