Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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 am transfering all my sites from one server to other and have a couple of domains parked on primary domain (ns1.example.com, ns2.example.com). I could just change nameservers of that domain, however I would still have to wait up to 48 hours for my site to become accessible in new server.
I was thinking, would it be possible to redirect DNS queries to a new server somehow? Using iptables perhaps?
use apache reverse proxy services. However its no meaning, after you completely read information, testing and configuring already ~2 days(After you read my post).
I do have mod_proxy set up on apache, however (if I understand correctly what reverse proxy is) it will only work for HTTP traffic, also REMOTE_ADDR header will be set to server IP (might break some scripts) and finally, it will use twice the bandwidth.
Wouldn`t redirecting DNS be more elegant solution?
Why don't you migrate all the zones to the new server via a zone transfer, switch the new server to master once it has compelted, and leave the old server running until it no longer receives queries. Once the root servers start delegating the domains to the new server you can then decommission the old server when its no longer needed.
it will use twice the bandwidth. Yes it will use twice
Wouldn`t redirecting DNS be more elegant solution?
I not sure, since you need to use domain name insdeed of ipaddress, I think untill the end client will still find your old server if client dns still point to you(And probably you have no way to update their dns server unless the dns server had get replicate from new setting)
Apache 1.3 doesn`t have all the fancy options apache 2.2 has.
Nevertheless I did my best to set up a reverse proxy.
At first it didn`t work becouse destination server has to receive a `host` header instead of only IP. I`ve bypassed this by appending domain I am redirecting and destination server IP to /etc/hosts and making request directly to domain.
I could then open title page fine, however requesting other pages did not work, I got a HTTP error.
While I am sure this can be fixed, reverse proxy is very slow as servers are on different networks.
During you wait the solution, I guess your new web server's DNS record has been sync to world wide. Let us know your new website then we can have a try(put little bit difference between your both website so we can recognize it).
No, it hasn`t synced completely yet. I see quite some traffic flowing to the new server already, but it might still take a couple of days for dns to completely resolve for some ISPs.
I`ve altered named configuration in old server so primary domain points to new IPs, however it`s not much of a help as providers still have to re-cache DNS.
If you are concerned of a server caching a response then beforehand lower the TTL to something like 5 minutes. This will allow faster synchronization times so that cache servers don't keep old records. Then once the change is complete up the TTL back to its normal value.
Primary domain is now being resolved correctly, however ns1.primarydomain and ns2.primarydomain still resolve to old IP address.
I`ve created separate named entries for them and pointed to new IP (I have ttl of 4hrs), however hours have passed without any result.
Anyway, most visitors already are being directed to new server and I want to continue this thread just so I can migrate easier next time.
Offtopic: do I have to contact server ISP to set-up RDNS (Reverse DNS) or will named entry suffice?
actually reverse lookup is useful for receipient email server to check whether your email server is a spam source or not. If you services is not email server(they are email client), then you can simply forget about it(Setting up a new email server can be very troublesome).
However, normally reverse lookup zone normally is heavy and you need to apply from ISP.
Oh, thank you for clarifying that. I thought RDNS address was requested by recipient server to prevent spam. Looks like I misunderstood the whole concept of RDNS then.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.